You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by David Spencer <da...@tropo.com> on 2004/06/03 23:19:16 UTC
bonus for exact case match
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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org