sirensolutions / siren-join

[This is the old, single node version for Elasticsearch 2.x, see the latest "Siren Federate" plugin for distributed Elasticsearch 5.x and 6.x capabilities]
http://siren.io
GNU Affero General Public License v3.0
183 stars 60 forks source link

nullpointerexception #109

Open libenyang opened 8 years ago

libenyang commented 8 years ago

I download the jar and test like this: SearchResponse sr = new CoordinateSearchRequestBuilder(client).setIndices("sp_gf").setQuery( QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery()

                    ,solutions.siren.join.index.query.QueryBuilders.filterJoin("s_1_yb").indices("sp_c").path("s_1_yb").query(

                            QueryBuilders.termQuery("s_1_yb", "512099")))).setSize(1000).execute().actionGet();

there have error: java.lang.NullPointerException at org.elasticsearch.client.transport.support.TransportProxyClient$1.doWithNode(TransportProxyClient.java:58) at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:212) at org.elasticsearch.client.transport.support.TransportProxyClient.execute(TransportProxyClient.java:55) at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:286) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:351) at solutions.siren.join.action.coordinate.CoordinateSearchRequestBuilder.execute(CoordinateSearchRequestBuilder.java:36) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59) at com.sophon.search.text.SearchTest.testSearchSirenjoin(SearchTest.java:2537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at junit.framework.TestCase.runTest(TestCase.java:176) at junit.framework.TestCase.runBare(TestCase.java:141) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:252) at junit.framework.TestSuite.run(TestSuite.java:247) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

zarucki commented 7 years ago

I think you need to add SirenJoinPlugin.class to plugin list when you are creating TransportClient. It helped in my case.