Hi,
we are using Seam together with Hibernate Search 3.0.0 GA and need to override Lucenes DefaultSimilarity class with our custom one.
How can I do this? I implemented our custom Similarity, overriding
Code:
public float lengthNorm(String fieldName, int numTerms)
public float tf(float freq)
methods.
Now the Lucene documentation says:
"To make this change, implement your own Similarity (likely you'll want to simply subclass DefaultSimilarity) and then use the new class by calling IndexWriter.setSimilarity before indexing and Searcher.setSimilarity before searching."
How can I pass the new Similarity Implementation to the IndexWriter and the Searcher when using Hibernate Search?
I know, that the latest Beta of HS supports this, but we are using 3.0.0.GA.
Any (fast) help would greatly be appreciated.
Thanks!
Alexander