lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "German Kondolf" <>
Subject Re: Searching chomps my terms..
Date Tue, 11 Mar 2008 14:54:44 GMT
As André said, the problem is that you're using the SimpleAnalyzer, it
truncates numbers from the analyzed text, you should use at least a
StandardAnaylzer for this purpose.

The analyzer must be configured at search & indexing process, because
if you index a "cit2" with a SimpleAnalyzer it would be stored as a
"cit", when you try to search it with a StandardAnalyzer, the
QueryParser will create a TermQuery with "cit2", and no docs would
match that query.


Germán Kondolf

On Mon, Mar 10, 2008 at 6:57 PM, João Rodrigues <> wrote:
> Hello all! I'm trying to do a search based on alphanumeric terms such as:
>  cit2, mit12, hiv17, etc. However, when submitting them to Lucene, it only
>  searches for "cit", "mit" and "hiv". Anyone has an idea why such thing
>  happens?
>  Cheers!
>  João Rodrigues

View raw message