Hi everyone! I tried to inject the synonyms during indexing. I created a custom analyzer. It pretty much does the same as a standard analyzer with an addition of having synonym filter. During indexing and searching, I pass this custom analyzer to both indexwriter and indexsearcher, but the results do not seem to be different so I’m guessing I must have made a mistake somewhere. So basically what happens in custom analyzer’s constructor is that it just reads the synonyms.txt file and creates SynonymMap and then I’m overriding TokenStreamComponents method of an Analyzer class where I pass newly created SynonymMap in the SynonymFilter. What am I doing wrong? If you’d like to have a look at the code, here it is: CustomAnalyzer.java <https://gist.github.com/gtkesh/5986851>
I'd appreciate your suggestions. Thanks in advance! -- View this message in context: http://lucene.472066.n3.nabble.com/Injecting-custom-synonyms-in-Lucene-tp4077674.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org