lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yang <jyang_w...@yahoo.co.uk>
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 <erik@ehatchersolutions.com> 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 = searcher.search(new
> 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
helpful!!!

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

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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


Mime
View raw message