[Xapian-discuss] get_mset and check_at_least?
Jim Spath
jspath at pangeamedia.com
Fri Jun 22 15:33:12 BST 2007
Olly Betts wrote:
> On Fri, Jun 22, 2007 at 09:48:30AM -0400, Jim Spath wrote:
>> get_matches_estimated does indeed return the correct number of results,
>> but an unexpected side effect of this change is that now I get back all
>> the results, instead of the 10 I requested.
>> [...]
>> Anyways, I guess I'm curious about the resolution of this issue.
>
> I don't know - I can't see anything relevant in the xapian-core
> ChangeLog, so I suspect nothing yet.
>
> A quick look at the code suggests this fix in xapian-core, but I
> don't have time to test it right now:
>
> http://oligarchy.co.uk/xapian/patches/xapian-check-at-least.patch
>
> Does that fix your problem?
>
> Cheers,
> Olly
Thanks for the quick response Olly!
We're running Debian on all our servers over here so we used the
prebuilt packages from the Xapian website to install everything... ie we
didn't build from source. I talked to my systems guy and he seemed
reluctant to build from source for what is admittedly a small problem.
So I don't think I'll be able to test your patch... sorry :(
Also, I'm not even sure I want to use check_at_least, as it will not
scale well if our index gets large.
The biggest problem the inaccurate get_matches_estimated causes is when
I provide a link to the last page of search results from the first page.
It results in no entries being shown on the page.
I'm now thinking that I could handle this in a more elegant way. When
the user attempts to click to the last page, and we exceed the number of
matches, we now know the correct number of matches. So I can use the
correct number of matches and switch the correct page and provide a
better user experience.
How do other people handle this type of problem?
- Jim
More information about the Xapian-discuss
mailing list