#1 Scale results count accuracy

Closed
opened 8 years ago by spaghetti · 1 comments

Sphinx has trouble estimating total_found for a query when max_matches is set too low. When gazelle searches, it normally sets max_matches to highest group result number on the page (on page 1 max_matches is 50, on page 2 it’s 100, etc) This causes the reported “Results” count to be too large for queries with many results (like the default browse view) and the “last” page link will point to a page that doesn’t exist

We “fixed” this by hard coding 1500 as the minimum value of max_matches because testing showed it had no performance impact, and this makes the results count perfectly accurate on our DB of ~6000 groups, but it doesn’t ensure 100% accuracy at any scale. The minimum value of max_matches should grow slightly over time as the database does, either by being determined on every query, or by being updated by the scheduler every so often.

Sphinx has trouble estimating total_found for a query when max_matches is set too low. When gazelle searches, it normally sets max_matches to highest group result number on the page (on page 1 max_matches is 50, on page 2 it's 100, etc) This causes the reported "Results" count to be too large for queries with many results (like the default browse view) and the "last" page link will point to a page that doesn't exist We "fixed" this by hard coding 1500 as the minimum value of max_matches because testing showed it had no performance impact, and this makes the results count perfectly accurate on our DB of ~6000 groups, but it doesn't ensure 100% accuracy at any scale. The minimum value of max_matches should grow slightly over time as the database does, either by being determined on every query, or by being updated by the scheduler every so often.
spaghetti added the
Enhancement
label 8 years ago
spaghetti added the
Migrated Issue
label 8 years ago
spaghetti commented 8 years ago
Owner

Fixed in 87bec35386

Fixed in https://git.oppaiti.me/Oppaitime/Gazelle/commit/87bec353866d536b31509e0b1f13b5f3c625ffff
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.