lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karimi-Tabatabaie Jamal" <Jamal.Kar...@cursor.de>
Subject QueryParser explicit and implicit search operator
Date Fri, 16 Feb 2007 18:53:13 GMT
> hello,
> 
> I have a problem with the QueryParser and the default search operator
> AND. 
> 
> So let me please explain my problem in hope that you can help me. 
> 
> I have integrated the search engine in our CRM product. To make it
> easier for the user we decided to set the default search operator to
> 'AND'. Now we discovered that search strings that contain OR do not
> parsed as expected:
> 
> When we search after 'Hare AND Tortoise' the QueryParser parses it
> correct to 'Hare AND Tortoise'.
> But when we search after 'Hare OR Tortoise' the QueryParser parses it
> again to 'Hare AND Tortoise'!
> In both cases all hits contain both search trems.
> 
> So I played a little around but I have no idea how to solved this.
> 
For my problem there seems to exist a lucence Bug
(http://issues.apache.org/jira/browse/LUCENE-167) but also it seems that
it's solved in the Lucene integration on site http://www.lucenebook.com.

> I put the relevant source code to the attachment if you like to review
> the short methods search() and buildQuery(QueryParser parser). I use
> lucene 2.0. 
> 
>   <<MultiSearch.java>> 
> If you would please give me any hints or tips, I'll be grateful for
> your information.
> 
> 
> Yours sincerely,
> 
> Jamal


Mime
View raw message