Re: Unexpected Results - using should and must in boolean query

2010-09-12 Thread liat oren
Hi, Thanks for both of you for the answer. I will try the solution of Uwe, it looks like your suggestion will solve my problem. Many thanks, Liat On 12 September 2010 16:51, Uwe Schindler wrote: > Hi, > > I always recommend my customers to not mix should and must in the same > BooleanQuery

RE: Unexpected Results - using should and must in boolean query

2010-09-12 Thread Uwe Schindler
Hi, I always recommend my customers to not mix should and must in the same BooleanQuery if strict boolean matching is needed. It will match all docs, containing the MUST clause and "boost" all SHOULD terms. If you have some MUST terms, but you also want to have at least one of a list of other ter

Re: Unexpected Results - using should and must in boolean query

2010-09-12 Thread Erick Erickson
This is expected. The clause you add with MUST does just that, any documents returned MUST have that term. The SHOULD part of the query just says will simply bump the scores of documents with that clause. As to scores being different on the queries (and I'm having a hard time understanding your po

Re: iterate through tokens in standardtokenizer

2010-09-12 Thread Karthik K
Thanks a lot for the help.

Unexpected Results - using should and must in boolean query

2010-09-12 Thread liat oren
Hi, I am running a query and get some unexpected results. When I run boolean query on a text field for the word X, using occur = SHOULD, the results contain the word X. However, when I add another boolean query on another field (country) for the word Y, using occur = MUST, in the results I get o

RE: iterate through tokens in standardtokenizer

2010-09-12 Thread Uwe Schindler
http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/analysis/pack age-summary.html Read the example for "Using the new TokenStream API"! Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: K