[Xapian-discuss] get_mset query
Olly Betts
olly at survex.com
Fri Feb 3 01:40:35 GMT 2006
On Mon, Jan 16, 2006 at 02:50:07PM +0000, Martin Hearn wrote:
> If I add the line: get_mset(0,10,100) I expect 10 results back after
> checking 100, however I get 100 results back. I was wondering why
> this would be?
I'm unclear exactly what you mean by "get 100 results back" here.
Are you talking about how many values the mset object contains,
or the values returned by get_matches_estimated() or something
else?
get_mset(0,10,100) should give exactly the same results as
get_mset(0,100), except that you don't get access to the document
ids for matches 10-99 (counting the first result as 0).
The benefit is that the number of results which need to be sorted
is reduced (from 100 to 10 in this case).
So you should get the same values for get_matches_estimated() etc as
for get_mset(0,100). If you don't, that's a bug. If you can provide
a test case it shouldn't be hard to fix.
Or perhaps the issue here is that the API documentation for the
checkatleast parameter needs improving:
checkatleast
the minimum number of items to check. Because the matcher optimises,
it won't consider every document which might match, so the total
number of matches is estimated. Setting checkatleast forces it to
consider that many matches and so allows for reliable paging links.
Cheers,
Olly
More information about the Xapian-discuss
mailing list