lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: Problem with search an exact word and stemming
Date Wed, 25 Jun 2008 12:53:52 GMT
The way I've solved this is to index the stemmed *and* a special
token at the same position (see Synonym Analyzer). The From your
example, say you're indexing progresser. You'd go ahead and index the
stemmed version , "progress", AND you'd also index "progresser$"
at the same offset. Now, when you want exact matches, search for
the token with the $ at the end.

This does make your index a bit larger, but not as much as you'd expect.


On Wed, Jun 25, 2008 at 4:21 AM, renou oki <> wrote:

> Hello,
> I have a stemmed index, but i want to search the exact form of a word.
> I use French Analyzer, so for instance "progression", "progresser" are
> indexed with the linguistic root "progress".
> But if I want to search the word "progress" (and only this word), I have to
> many hits (because of "progression", "progresser"...)
> The field is indexed, tokenized and no store...
> Is there a way to do this, I mean to search an exact word in a stemmed
> index
> ?
> I suppose that I have to use the same analyzer for indexing and searching.
> I try with a PhraseQuery, with quotes...
> Ps : I use lucene 1.9.1
> Thanks
> Renald

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message