'How to change default Similarity for Indexing and searching in Lucene.net 3.0.3
I am new in Lucene and I am trying to change the default similarity to BM25. I am using Lucene.net library (version 3.0.3) in a WPF project (.net 4.8). For instance for IndexSearcher I would expect to be something like this :
IndexReader = IndexReader.Open(directory, true);
var _Searcher = new IndexSearcher(IndexReader);
_Searcher.Similarity=Similarity.BM25;
Also on the indexing part I cannot find were to change the default Similarity.
Solution 1:[1]
Hello everyone for anyone has the same query with me in the future, it seems that Similarity is not included in 3.0.3 but is included in Lucene 4.8. Hence downloading the beta version of 4.8 did the trick
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | TMAK |
