Hi,
I am trying to build a custom front end to my Nutch Index.  Using
NucthBean as an accessor should be plenty flexible for my needs.  My
problem comes when I try to build a new query to send to NutchBean.
Here is my test and the traceback from the error.  Any ideas ? -

package tests;
import java.io.File;
import java.io.IOException;

import org.apache.nutch.searcher.Hits;
import org.apache.nutch.searcher.NutchBean;
import org.apache.nutch.searcher.Query;


import junit.framework.TestCase;
public class SearchTest extends TestCase{
        private NutchBean nutchBean;
        
        public void setUp() throws IOException{
                File indexFile = new File("/path/to/nutch/index");
                nutchBean = new NutchBean(indexFile);
        }
        
        public void tearDown() throws IOException{
                Query query = Query.parse("search string");
                Hits hits = nutchBean.search(query,10);
                assertEquals(10,hits.getLength());
        }
        
        public void testSearchNutch(){
                
        }
}



The Trace-----
java.lang.ExceptionInInitializerError
        at
org.apache.nutch.searcher.IndexSearcher.search(IndexSearcher.java:83)
        at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:142)
        at org.apache.nutch.searcher.NutchBean.search(NutchBean.java:135)
        at tests.SearchTest.tearDown(SearchTest.java:22)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.RuntimeException:
org.apache.nutch.searcher.QueryFilter not found.
        at
org.apache.nutch.searcher.QueryFilters.<clinit>(QueryFilters.java:47)
        ... 14 more



Reply via email to