lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "owen@aus" <owen_mo...@yahoo.com.au>
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. 

Cheers,
Owen.
--
View this message in context: http://www.nabble.com/Default-search-to-AND-rather-than-OR-t1640214.html#a4442682
Sent from the Lucene - Java Developer forum at Nabble.com.


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


Mime
View raw message