lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: search within search
Date Fri, 03 Nov 2006 18:25:44 GMT
spinergywmy <spinergywmy@gmail.com> wrote on 03/11/2006 00:40:42:

>    I have another problem is I do not perform the real search within
search
> feature which according to the way that I have coded, because for the
second
> time searching, I actually go back to the index directory to search the
> entire indeces again rather then cached the first time search result.
>
>    How can I solve this problem? Do I need to use queryFilter and
> reconstruct the codes again, and that is time consuming, is there any how
I
> can get it done without reconstruct. Or do I need to use bitSet within my
> existing codes.

This was the recommendation you got on this in the list (forgot who it
was): submit query1 ANDed with query2. True, this is searching again the
"entire" index. In particular, it is re-doing work already done for query1.
However this is the simplest approach, with equivalent results. Unless you
are facing performance problems this should be sufficient.

If however, you are facing performance issues, say, if the queries are very
large, and the index is large as well, and you have more than 2 stages
(search within (search within (search within search (...)))), and
resubmitting a larger and larger boolean query is out of the question - you
can go with the filter approach. For this you can use your hit collector,
which, while query1 is processed, would populate a bitset to be used for a
filter for query2, should that be requested by the user. But I wouldn't go
there if I don't have to.

Doron



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message