lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "owen@aus" <>
Subject Default search to AND rather than OR
Date Thu, 18 May 2006 01:04:01 GMT

I have users that want the search to work like google. So when a user enters
a query, such as:

Tram Pole

The result should be documents that contains both "tram" and "pole". At the
moment, the default seems to be documents that contain "tram" or "pole". 
I thought of paring the query before I submit it to lucene and place "AND"
between each term but this would prevent the user from entering an OR query
(or any other lucene sytax!).

So I'm stuck. I've been looking at the Analyzers but nothing seems to do
what I need. This seems such an obvious question that I'm betting that
someone out there has just the right solution. 

View this message in context:
Sent from the Lucene - Java Developer forum at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message