lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S├ębastien Rainville" <sebastienrainvi...@gmail.com>
Subject Using custom Similarity class
Date Thu, 17 Jul 2008 01:19:16 GMT
Hi,

I'm trying to make solr use my custom similarity class:

import org.apache.lucene.search.DefaultSimilarity;

public class CustomSimilarity extends DefaultSimilarity {
}

but I keep getting this error:

com.example.CustomSimilarity cannot be cast to
org.apache.lucene.search.Similarity
    at org.apache.solr.schema.IndexSchema.readConfig(IndexSchema.java:449)
    ... 28 more

and in schema.xml I have this:
<similarity class="com.example.CustomSimilarity"/>

I even tried to extend Similarity directly just to make sure and it's not
working either. It means that it finds the class, it's able to instantiate
it but somehow it's not the right kind of object?!? What am I missing?

Thanks in advance,
Sebastien

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message