Remove moreLikeThis StopWords setup
This set is the same one used by the analyzer, so the tokens will never exist in the stream.
- Id
- 81be4f7a74439e94837b6f6fb5f77e13e86d4a39
- Author
- Caio
- Commit time
- 2019-04-30T09:56:22+02:00
Modified src/main/java/co/caio/cerberus/search/SearcherImpl.java
import co.caio.cerberus.model.SearchResult;
import java.io.IOException;
import java.io.StringReader;
-import org.apache.lucene.analysis.en.EnglishAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.FloatPoint;
import org.apache.lucene.document.IntPoint;
moreLikeThis = new MoreLikeThis(builder.getIndexReader());
moreLikeThis.setAnalyzer(indexConfiguration.getAnalyzer());
- moreLikeThis.setStopWords(EnglishAnalyzer.ENGLISH_STOP_WORDS_SET);
moreLikeThis.setMaxDocFreq(10000);
}