lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SBS <>
Subject How to ignore apostrophes in indexes and queries?
Date Mon, 12 Sep 2011 04:01:12 GMT
In out situation we need it so that searches containing apostrophes and those
not containing apostrophes yield identical results for content that contains
apostrophes.  We also need it so that the content is still stored with the
apostrophes present and so that the highlighter indicates that the word(s)
that need to be highlighted in the displayed content do contain the

So for example, if the content looked something like:

/*onset of Alzheimer's disease*/

then identical results would be returned for a query of /*alzheimers*/ and
for a query of /*alzheimer's*/ and in both cases the highlighter would
indicate that the word /*Alzheimer's*/ needs to be highlighted in the
displayed content.

Is this possible?  What's the best way to achieve this?  I am using Lucene
3.2 with StandardAnalyzer and QueryParser at present.



View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message