Answer the question
In order to leave comments, you need to log in
Question about Lucene.net?
We need a working example of a search taking into account word forms on the Lucene.net engine.
Those. so that the query "cars" would find "car".
You can use the simplest example, you can only for the English language - the main thing is that it works!
Rummaged all Google. I 'm f**king with the code for several hours, either the search for word forms does not work, or I hit the internal Exceptions of Lucene.net itself.
Apparently I'm doing something wrong, but I can't figure it out.
I will be glad for any help.
Answer the question
In order to leave comments, you need to log in
it's called stemming.
see - stackoverflow.com/questions/1192671/how-to-enable-stemming-when-searching-using-lucene-net
I myself did not do this for lucene, but for solra it happened.
You need to use SnowballAnalyzer. A simple indexing example:
Analyzer analyzer = new SnowballAnalyzer(Version.LUCENE_34, "Russian", StopAnalyzer.ENGLISH_STOP_WORDS_SET);
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_34, analyzer);
IndexWriter writer = new IndexWriter(dir, config);
Document doc = new Document();
...
writer.addDocument(doc);
Here is another link:
http://stackoverflow.com/questions/5391840/stemming-english-words-with-lucene
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question