Hi all,
I'm getting some strange behavior from the ES server when using a term
query + a geo distance filter + a sort. I've tried this with 1.3.2,
1.3.5, as well as 1.4.0. All exhibit this same behavior. I'm using the
Java transport client. Here is my SearchRequestBuilder payload in
toString() format.
query { "from" : 0, "size" : 10, "query" : { "term" : {
"ug_context" :
"2abaf75a-69c4-11e4-918e-4658cde16dad__application__zzzcollzzzusers" }
}, "post_filter" : { "geo_distance" : { "go_location" : [
-122.40474700927734, 37.77427673339844 ], "distance" : "200.0m" }
}, "sort" : [ { "su_created" : { "order" : "asc",
"ignore_unmapped" : true } }, { "nu_created" : { "order" :
"asc", "ignore_unmapped" : true } }, { "bu_created" : {
"order" : "asc", "ignore_unmapped" : true } } ] } limit 10
Here is the stack trace
org.elasticsearch.common.util.concurrent.UncategorizedExecutionException:
Failed execution
at
org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:90)
at
org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:50)
at
org.apache.usergrid.persistence.index.impl.EsEntityIndexImpl.search(EsEntityIndexImpl.java:307)
at
org.apache.usergrid.corepersistence.CpRelationManager.searchConnectedEntities(CpRelationManager.java:1453)
at
org.apache.usergrid.corepersistence.CpEntityManager.searchConnectedEntities(CpEntityManager.java:1585)
at org.apache.usergrid.persistence.GeoIT.testGeo(GeoIT.java:202)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.apache.usergrid.CoreApplication$1.evaluate(CoreApplication.java:133)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.apache.usergrid.CoreITSetupImpl$1.evaluate(CoreITSetupImpl.java:66)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
Caused by: java.lang.NullPointerException
at
org.elasticsearch.common.io.stream.StreamOutput.writeString(StreamOutput.java:223)
at
org.elasticsearch.common.io.stream.HandlesStreamOutput.writeString(HandlesStreamOutput.java:55)
at
org.elasticsearch.common.io.stream.StreamOutput.writeStringArray(StreamOutput.java:298)
at
org.elasticsearch.action.search.SearchRequest.writeTo(SearchRequest.java:615)
at
org.elasticsearch.transport.netty.NettyTransport.sendRequest(NettyTransport.java:685)
at
org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:199)
at
org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:57)
at
org.elasticsearch.client.transport.support.InternalTransportClient$1.doWithNode(InternalTransportClient.java:109)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:202)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:334)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:424)
at
org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:1116)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
at
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
I've observed a couple of things. I don't see this exception when there
are no matching documents. When I do have matching documents, then I see
the NPE.
Any ideas what I'm doing wrong? The payload itself looks fine, and
serializes from the builder to a SMILE byte payload. However, when that
payload is transmitted over Netty, I see this exception.
Thanks,
Todd
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/23b8befe-e62c-49b6-a9e5-1394e741f55d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.