: class cast exceptions when I try to use my own similarity class, like this:
: public class TestSimilarity extends DefaultSimilarity : { : } I have two alternate guesses 1) this may be a missleading error message, the real problem may be that without a default constructor, it can't instantiate your Similarity. 2) this may be the behavior when the version of Similarity/DefaultSimilarity you compile your class against don't match the versions loaded by the JVM solr is running in (i think there is a more specific JVM error when that happens though) ...to be safe, add a default constructor, and compile against the lucene-core jar in the lib directory of the wolr release you are using. : The jar with my class is located in example/ext, I get a class not found : if I put it elsewhere. Should I be locating this jar elsewhere? Do I you should create a "lib" directory in your solr.home directory and put the jar there ... example/ext is where jars you want jetty to load in one of the really low level class loaders live -- there's no need to put anything SOlr specific there. more details are in the solr home readme (example/solr/README.txt) and on the SolrPlugins wiki... http://wiki.apache.org/solr/SolrPlugins : need to put lucene-nightly in the same directory? I also get a class no, that's just because you tried to use example/ext which is loaded well before hte solr.war, so in order for you to put your jar in example/ext, everything else you jar refrences needs to be there as well. -Hoss