javaandroidlucenelexical-analysisstandardanalyzer

How to make the letter "A" an exception in Lucene's StandardAnalyzer?


I've created a medical dictionary in Android using Lucene. The words and definitions are Danish, and I'm using StandardAnalyzer to index and search for the entries. The idea is that when I click on an entry in my ListView, another Activity shows up with the word on top and the definition below it.

The dictionary works exactly as expected EXCEPT for the entry A.. When I click on A. in my ListView, the next Activity shows only the screen's background colors--no word, no definition, no any kind of text.

My guess is that StandardAnalyzer counts the letter A as a stop word during the indexing process, because the Activity for the entry V. shows up correctly. How can I get around this?


Solution

  • I ended up using DanishAnalyzer. Probably better that way, anyway.