lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yang <>
Subject Re: Query Filters on term A in query "A AND (B OR C OR D)"
Date Thu, 13 Nov 2003 21:32:59 GMT
 --- Erik Hatcher <> wrote: 
> Are we talking about that query being entered by the
> user and you 
> handing it just like that to QueryParser?  If so,
> then QueryFilter 
> won't help.
Well, not quite, User normally enters a search string
A that normally returns 1000 out of 2 millions docs. I
then append A with 500 OR conditions... A AND (B or C
or ... or x500). I am trying to optimse the 500 OR
terms so that it does not do a full 2 millions docs
search but on the 1000 returned. Would this help?
> Well, that is not quite the right API, but something
> like this:
>      Query maleQuery = new TermQuery(new
> Term("Gender", "Male"));
>      Filter filter = new QueryFilter(maleQuery);
>      Hits hits =
> TermQuery("ZipCode","CA10927"), 
> filter);

Mmm, I get the order wrong, will give it a try
tommorrow at work, thanks for posting..
> Keep in mind all that Doug has said on this topic as
> well.  In this 
> case, it probably won't be any faster than a single
> query, maybe even 
> slower.  But if you use the same instance of the
> filter for future 
> searches there will certainly be a benefit.

How long will the filtered doc id be retained in the
memory? can I manually manpulate this filtered doc
ids, say pre-populate a sets of filtered data in
memory and play with memory sizes.

Thanks all folks, you have all been extremely

> 	Erik
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Want to chat instantly with your online friends?  Get the FREE Yahoo!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message