You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Hassan Saneifar <ha...@lirmm.fr> on 2010/12/14 18:26:40 UTC

query formulation

Hello,
I'm wondering if there is a way to configure the query in lucene to use 
the logical operation ?
In fact, I would like to force retrieval of documents which contain 
obligatory a given keyword or do not contain an other one. I can do that 
by a preprocessing (filter the documents which contain the keyword) but 
I would like to that in the query formulation.
Many thanks

-- 
Hassan Saneifar, 


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


Re: query formulation

Posted by Erick Erickson <er...@gmail.com>.
Hmmmm, have you seen this page?
http://lucene.apache.org/java/3_0_3/queryparsersyntax.html
<http://lucene.apache.org/java/3_0_3/queryparsersyntax.html>If that doesn't
help, perhaps you can explain what it is that you're trying to do that the
syntax
is inadequate for.

Do note that Lucene query syntax is better thought of with the +/-/ / syntax
(this last is a blank
operator standing for "should". It's not true boolean logic.

Best
Erick

On Tue, Dec 14, 2010 at 12:26 PM, Hassan Saneifar
<ha...@lirmm.fr>wrote:

> Hello,
> I'm wondering if there is a way to configure the query in lucene to use the
> logical operation ?
> In fact, I would like to force retrieval of documents which contain
> obligatory a given keyword or do not contain an other one. I can do that by
> a preprocessing (filter the documents which contain the keyword) but I would
> like to that in the query formulation.
> Many thanks
>
> --
> Hassan Saneifar,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>