lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Indexing puncutation
Date Tue, 28 Jun 2005 19:48:47 GMT

On Jun 28, 2005, at 3:37 PM, Chris D wrote:
> Lastly, and someone should correct me if I'm wrong, but you should
> always use the same analyzer to create and to query the index.
> Otherwise queries that should return hits wont. For instance the
> following.
>
>    The canoist paddles
>
> Could be indexed as [boater] [strokes]... And the query
>
>    contents:paddles
>
> would be parsed to [paddle] and likely would not get the hit you  
> expect.

Whether you use the *same* analyzer or not is a great question.  In  
most cases, yes, you should.  But the more correct answer is that you  
need to use compatible analyzers.

For example:
If you're injecting synonyms during indexing, there is no need to  
inject them during query parsing.  In that case, the analyzers would  
do the same processing steps except the indexing one would also  
inject synonyms.

     Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message