lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijaymohanp <vi...@ranker.com>
Subject Solr upgraded to from 1.4.0 to 3.3.0 and getting exception at WordDelimiterFilterFactory
Date Mon, 12 Sep 2011 13:00:15 GMT
We have recently upgraded the solr version from 1.4.0 to version 3.3.0. Now
from app we are having custom word delimiter filter generate the
TokenStream. Now that method is failing WordDelimiterFilterFactory.create()
method. Exception that am getting given below, 

java.lang.NoSuchMethodError:
org.apache.solr.analysis.WordDelimiterFilter.addAttribute(Ljava/lang/Class;)Lorg/apache/lucene/util/Attribute;
	at
org.apache.solr.analysis.WordDelimiterFilter.(WordDelimiterFilter.java:123)
	at
org.apache.solr.analysis.WordDelimiterFilterFactory.create(WordDelimiterFilterFactory.java:108)
	at
com.ranker.app.service.search.AutoSuggestService.createWordDelimiterFilter(AutoSuggestService.java:363)
	at
com.ranker.app.service.search.AutoSuggestService.createSolrQuery(AutoSuggestService.java:336)
	at
com.ranker.app.service.search.AutoSuggestService.secondarySearch(AutoSuggestService.java:276)
	at
com.ranker.app.service.search.AutoSuggestServiceTest.testSecondarySearch(AutoSuggestServiceTest.java:174)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

And my method is,

private TokenStream createWordDelimiterFilter(TokenStream tokenStream)
    {
        WordDelimiterFilterFactory wordDelimiterFilterFactory = new
WordDelimiterFilterFactory();
        HashMap&lt;String, String&gt; wordDelimiterParameters = new
HashMap&lt;String, String&gt;();
        wordDelimiterParameters.put("generateWordParts", "1");
        wordDelimiterParameters.put("generateNumberParts", "1");
        wordDelimiterParameters.put("catenateWords", "0");
        wordDelimiterParameters.put("catenateNumbers", "0");
        wordDelimiterParameters.put("catenateAll", "0");
        wordDelimiterParameters.put("splitOnCaseChange", "0");
        wordDelimiterFilterFactory.init(wordDelimiterParameters);
        return wordDelimiterFilterFactory.create(tokenStream);
    }

Your help appreciated in advance!

--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-upgraded-to-from-1-4-0-to-3-3-0-and-getting-exception-at-WordDelimiterFilterFactory-tp3329542p3329542.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message