lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Patterson <jdp2...@gmail.com>
Subject Re: Mixing non scored an scored queries
Date Tue, 15 Jul 2008 16:09:46 GMT



eks dev wrote:
> 
> do not forget that Filter does not have to be loaded in memory, not any
> more since LUECEN-584 commit! Now it is only skipping iterator what you
> need.
> 
> 
> translated, you could use:
> ConstantScoreQuery created with Filter made from TermDocs (you need to
> implement only DocIdSet / DocIdSetIterator, this is rally trivial as
> TermDocs implements next() and skipTo() methods)
> 
> If TermDocs is not enough for you you could have a look at the
> BooleanFilter that will create only one (Open)BitSet per request if you
> feed it with TermDocs based Filters... 
> 
> Generally, it would be great to have BooleanQuery that Accepts Filters as
> clauses (infrastructure is now there thanks to Paul , see LUCENE-584)
> 
> 

I don't think filters are the way to go here because I need to use boolean
style logic e.g.

Search for free text "open fire" restricted to "London" OR "Brighton" in
category "Pubs and bars" OR "Restaurants"

which means I need to construct and run a BooleanQuery - unless I implement
my own boolean logic to use TermDocs which seems like overkill.

So it seems that creating a constant scoring TermQuery is the best
suggestion so far.

Thanks,

John

-- 
View this message in context: http://www.nabble.com/Mixing-non-scored-an-scored-queries-tp18460018p18469025.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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