dotslashlu
dotslashlu

Reputation: 3401

Sphinx search:'total_found' not exact?

I found total_found not exact through several tests:

In one of the tests, the total_found was 40379, the limit i set was (0,20), then i set the offset to be 2000 and the result was null. Not Until I set the offset much more lower it returned results.

What's the problem? Can anyone help me out? Thank you!

Upvotes: 3

Views: 1257

Answers (1)

Iaroslav Vorozhko
Iaroslav Vorozhko

Reputation: 1719

See the total variable - it is your current limit of max matches. You can change max matches limit in searchd section of sphinx.conf

max_matches = 100000

Restart searchd.

And then in application

$cl->SetLimits(2000, 20, 100000);

Last variable is the max matches limit.

This is done in this way because of performance, lower value of max matches give you better performance.

Upvotes: 1

Related Questions