The way I've always done this was to index two fields: say, "contents"
and "contents_unstemmed", (using a PerFieldAnalyzer) and then query
on both of them. This has the double effect of a) boosting unstemmed
hits, because every unstemmed match is also a stemmed one, so the
BooleanQuery combining
Ah, very cool. Thanks for the tip.
-M
On Feb 11, 2008 10:58 AM, Erick Erickson <[EMAIL PROTECTED]> wrote:
> You have to bet a bit clever. You can certainly inject the original with
> an
> increment of 0. See SynonymAnalyzer in Lucene In Action. This will not
> break phrase queries since your two
You have to bet a bit clever. You can certainly inject the original with an
increment of 0. See SynonymAnalyzer in Lucene In Action. This will not
break phrase queries since your two tokens occupy the same position.
But you'll have to do something like add a $ to the original at index time.
That w