lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Spencer <>
Subject bonus for exact case match
Date Thu, 03 Jun 2004 21:19:16 GMT
Does anyone have any experiences with giving a bonus for exactly 
matching case in queries?

One use case is in the java world maybe I want to see references to 
"Map" (java.util.Map)  but am not interested in a (geographical) "map".

I believe, in the context of Lucene, one way is to have an Analyzer that 
returns a TokenStream which, in cases where a word has some upper case 
characters, returns the word twice in that position, once as-is and once 
in lower case,  using the magic of Token.getPositionIncrement(). Then 
you'll need a query expander or whatnot which, when given a query like 
"Map", expands it to "Map^2 map".


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

View raw message