Re: Optional terms in BooleanQuery

2007-05-22 Thread Paul Elschot
This is actually more for java-dev, but anyway. On Tuesday 22 May 2007 11:04, Mark Miller wrote: > Sorry, didn't mean to imply that that whole spiel was a technical > explanation...just a "how I like to think of it" to get my head around > the BooleanQuery system. If your reading that, think hig

Re: Optional terms in BooleanQuery

2007-05-22 Thread Mark Miller
Sorry, didn't mean to imply that that whole spiel was a technical explanation...just a "how I like to think of it" to get my head around the BooleanQuery system. If your reading that, think high level overview more than technically accurate. I'll be more specific in the future -- as always, the

Re: Optional terms in BooleanQuery

2007-05-22 Thread Chris Hostetter
: BooleanQuery.Occur.SHOULD for C, D and E. However the javadocs for : BooleanClause.Occur.SHOULD states: : : "Use this operator for clauses that /should/ appear in the matching : documents. For a BooleanQuery with two |SHOULD| subqueries, at least one : of the clauses must appear in the matching

Re: Optional terms in BooleanQuery

2007-05-22 Thread Chris Hostetter
: Each doc is going to get a score -- if the score is positive the doc : will be a hit, if the score is 0 the doc will not be a hit. that's actually a fairly missleading statement ... the guts of Lucene doesn't prevent documents from "matching" with a negative score (specificly: a HitCollector ca

Re: Optional terms in BooleanQuery

2007-05-21 Thread Soeren Pekrul
Peter Bloem wrote: [...] "+(A B) C D E" [...] In other words, Lucene considers all documents that have both A and B, and ranks them higher if they also have C D or E. Hello Peter, for my understanding "+(A B) C D E" means at least one of the terms "A" or "B" must be contained and the terms

Re: Optional terms in BooleanQuery

2007-05-20 Thread Mark Miller
I like to think of it like this: Each doc is going to get a score -- if the score is positive the doc will be a hit, if the score is 0 the doc will not be a hit. If a boolean clause is Occur.Must and it is not found, the score will be dropped to 0 no matter what (if found, the score is obviou

Optional terms in BooleanQuery

2007-05-20 Thread Peter Bloem
I'm constructing a search with some required terms and some optional terms in in the query. According to some earlier posts that looks like "+(A B) C D E" in query syntax for required terms A and B and optional terms C D and E. In other words, Lucene considers all documents that have both A and