Reputation: 23
Is there a straightforward way to configure Lucene.net's standard analyzer to index and search terms with punctuation, e.g. Owner's, (owner), hello-world, owner!
Standard analyzer is my chosen analyzer as I still want to be able to recognize URLs/emails and remove stop words from queries.
Upvotes: 1
Views: 188
Reputation: 23
I managed to find a solution to this by swapping the Standard Analyzer for a Whitespace Analyzer. This now indexes all words including words with punctuation into Lucene. I also converted each field's value to lowercase and manually removed all stop words from the string before the indexing process.
Upvotes: 1