lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Apostrophe S ('s)
Date Sun, 20 Aug 2006 23:44:30 GMT
Sam Giffney wrote:
> Using the Standard Analyzer the string
> McDonald's
> is indexed with the term
> mcdonald
> so it will be found by a (QueryParser parsed) query for
> McDonald
> or
> McDonald's
> but not
> McDonalds
> Wikipedia (who uses lucene) says on
> An apostrophe is identical to a single quote, therefore Mu'ammar can
> be found searching for exactly that (and not otherwise). A word with
> apostrophe s is an exception in that it can be found also searching
> for the word without the apostrophe and the s.
> Is this a custom parser?

Following Wikipedia's explanation, McDonald's -> McDonald, by removing 
the apostrophe *AND* the s.  That text you quoted doesn't say that you 
can omit the apostrophe while leaving in the s, so my guess is they're 
using the exact same analyser.

In any case, have you tried using stemming?  Stemming would convert 
"mcdonalds" -> "mcdonald" so that both work.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message