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".

Thoughts/comments?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to