lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Confused about boolean query and how an IndexReader is associated with Hits
Date Wed, 07 Dec 2005 19:00:27 GMT

: In otherwords my BooleanQuery was more complex than I let on.

I believe I understand what you are saying, but it's a little hard to make
sense of given teh corrections and lack of context -- it sounds like it
shoudl work.  please print out query.toString() and make sure it looks
like what you are expecting.

As I remember someone else saying (I'm guessing Erik) if you're having
trouble, pelase post a simple, comlete, self contained (ideally JUnit)
example of your that uses a RAMDirectory.  You're sure to get lots of help
if everyone can immediately run your code to see your problem.


Something else you should think about *after* you get this working...

: (My config document has the field "ID" set to value "0" - all the other
: documents have a single field called "ID" set to the string of a positive
: integer so config is defined as
:
: private static final TermQuery config =new TermQuery(new Term("ID","0"));
: )

FYI: it sounds like what you're trying to achieve with this TermQuery in
particular could best be done with a Filter that only allows documents
which do not contain that magic term -- for stuff like this, filters can
be faster then BooleanQueries with negated clauses (especially if you know
that there will only ever be one of these config docs, you can short
circut all the others) and they can be cached and reused, saving even more
time.



-Hoss


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