lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: BOOLEAN OPERATOR HOWTO
Date Mon, 18 Jul 2005 13:09:27 GMT

On Jul 18, 2005, at 8:12 AM, Karthik N S wrote:
> I have 2 Questions.
But there were no question marks!   I don't understand your questions  
at all, sorry, but I'll see if I can decipher it somewhat....

> 1) The Search Criteria  src  requires to automatically fill   "  "   
> between  Search words with a Boolean Operator   "  AND ".

You mean to achieve AND'd clauses?   By default, OR is the operator,  
and AND must be explicit.  You can construct a QueryParser instance  
and set the default operator to AND, though, and then OR must be  
explicit.

>  2) The Search Criteria  src  requires to automatically recognise  
> the existing  Boolean Query  ' AND , + '  present and append the same
>      with  out any manupulations.
>
> Ex : -
> Search Word  =
>
> 'Lucene in Action Erik hatcher and  Otis  + Gospodnetic '   =    
> lucene AND action AND Eric  AND hatcher AND otis + gospodnetic .
>
>
> How to Achieve this , Is there any mechanism built into Lucene to  
> handle such situations.

Yes, this sounds like the default operator is what you're looking  
for.  Since you use "Lucene in Action" as an example, flip to page 94  
for more discussion on this, and then flip to the other pages  
mentioned here:

     http://www.lucenebook.com/search?query=default+operator

Erik


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