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
http://en.wikipedia.org/wiki/Wikipedia:Searching

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.

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to