lucene-solr-user mailing list archives

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

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


public class CustomSimilarity extends DefaultSimilarity {

but I keep getting this error:

com.example.CustomSimilarity cannot be cast to
    at org.apache.solr.schema.IndexSchema.readConfig(
    ... 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,

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