[Xapian-devel] search on subsets

Alexander Lind malte at webstay.org
Fri Apr 7 19:31:24 BST 2006


ah, very helpful.
thanks for this Olly!

Cheers
Alec

Olly Betts wrote:
> On Thu, Apr 06, 2006 at 04:17:44PM -0700, Alexander Lind wrote:
>   
>> i want to add a feature so that you can search within a search - search 
>> on a subset.
>>
>> i haven't yet started working on it, but as far as i can tell, there 
>> seems to be no easy way of doing this.
>>     
>
> If the original query is orig_query and the new query is new_query then
> "search for new_query within the results of orig_query" is:
>
>     Query(Query::OP_FILTER, new_query, orig_query)
>
> If it's soon after "orig_query" was run then that should be efficient
> too, since the Btree blocks used for the original query will be cached.
>
> It's not possible to do it more directly - Xapian's matcher does the
> minimum amount of work possible, so if you ask for 10 hits it stops
> after it's sure it has the best 10 - the complete set of matches isn't
> calculated so it doesn't make sense to save it to be searched within.
>
> Cheers,
>     Olly
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tartarus.org/pipermail/xapian-devel/attachments/20060407/37f6e724/attachment.htm


More information about the Xapian-devel mailing list