lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Patton <>
Subject Casting Exception with Similarity
Date Thu, 01 Mar 2007 16:32:22 GMT
I'm trying toconvert some of my code over to Solr, but I keep getting 
class cast exceptions when I try to use my own similarity class, like this:

Caused by: java.lang.ClassCastException: 
estSimilarity cannot be cast to
         ... 21 more

Here is TestSimilarity:

package dealcatcher.kolinka.lucene.similarity;


public class TestSimilarity extends DefaultSimilarity

And my schema.xml:

<similarity class="dealcatcher.kolinka.lucene.similarity.TestSimilarity"/>

It works fine if I use:

<similarity class=""/>

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 
need to put lucene-nightly in the same directory?  I also get a class 
not found error if lucene isn't located there, which seems strange since 
solr should be able to find lucene classes without my help.

View raw message