lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carl...@bookandhammer.com
Subject Re: Search all words of a query
Date Tue, 12 Feb 2002 15:16:13 GMT
Hi,

Right now you must either use the form foo AND bar or +foo +bar
to accomplish what you want to do before you send the query to the 
QueryParser.

Another alternative is to parse the query yourself and then create the 
queries using the BooleanQuery with the required flag set. This is 
somewhat difficult if you want to keep all the current QueryParser 
functionality.
One last option is to copy the current QueryParser and modify it to meet 
your needs.

Hope this helps.
--Peter
On Tuesday, February 12, 2002, at 07:07 AM, Mike Baroukh wrote:

>
> Hi all.
>
> On a form, users may enter words. I must search with thoses words.
> What I actually do is creating a Query with QueryParser using my 
> analyzer.
> But this make a search that match if one word match.
>
> I know that if I wan't all words to match, I must add a '+' before each
> word.
> I'd like to not be obliged to do this and I don't want to ask the user 
> to
> make this.
>
> Does any one see on witch parameter I can play to do this ?
>
> I don't think it's in the analyser (I already tried ! instead, I never 
> had
> any result).
> No, It's in the QueryParser but I'm not sure I can do anything.
>
> If sombody have the answer (positive or negative), It would be helpfull.
>
> Thanks in advance.
>
> Mike
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:lucene-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-
> help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message