Previously I had

.Net.Search.Similarity.Default = New LuceneIgnoreSimilarity

According to the migration Guide :

LUCENE-2236<https://issues.apache.org/jira/browse/LUCENE-2236>, 
LUCENE-2912<https://issues.apache.org/jira/browse/LUCENE-2912>: 
DefaultSimilarity can no longer be set statically (and dangerously) for the 
entire JVM. Similarity can now be configured on a per-field basis (via 
PerFieldSimilarityWrapper) Similarity has a lower-level API, if you want the 
higher-level vector-space API like in previous Lucene releases, then look at 
TFIDFSimilarity.

How can I configure this per field? Any examples you would like to share?

Found this online but this method doesn't exist

IndexWriterConfig config = new IndexWriterConfig(analyzer);
config.setSimilarity(perFieldSimilarities);

Reply via email to