FAQ
Hi Rakesh,

Set the default QueryParser operator to AND (default default operator :) is OR):

<http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/queryParser/QueryParser.html#setDefaultOperator(org.apache.lucene.queryParser.QueryParser.Operator)>

Steve
On 12/18/2007 at 1:22 PM, Rakesh Shete wrote:

Hi all,

I am facing problem with the following multifield query:

i_title:indoor* i_description:indoor* -i_published:false
+i_topicsClasses.id:1_1_*_*

The above query returns me even results which should not be
there. Ideally I would like the query resullts as:

(i_title:indoor* i_description:indoor* -i_published:false)
AND (i_topicsClasses.id:1_1_*_*)

i.e. The intersection of the first part and second part.

But what is happening currently is that I get a union of the
first part and second part, i.e., whatever results are
returned by "i_title:indoor* i_description:indoor*
-i_published:false" are combined (union) with results
returned by "+i_topicsClasses.id:1_1_*_*".

How do I write a query that returns me results which are an
intersection of the above 2 parts?

--Regards,
Rakesh S

_________________________________________________________________ Post
ads for free - to sell, rent or even buy.www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=186



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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 9 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedDec 18, '07 at 6:22p
activeDec 19, '07 at 12:34p
posts9
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase