Figured this out, however the code below seems to restart a new node on
each request, and is not cleaning up after itself.
Is there a better way to do this - for example by exposing a shared node
object to the mvel script plugin ?
PUT /test/user/1
{ "name":"jane"
, "partner":2
}
PUT /test/user/2
{ "name":"john"
, "partner":1
}
GET /test/user/_search
{ "_source":true
, "script_fields":
{ "partner":
{
"script":"org.elasticsearch.node.NodeBuilder.nodeBuilder().node().client().prepareGet('test',
'user',_source.partner).execute().actionGet().getSource()"
}
}
}
On Tuesday, April 1, 2014 4:44:40 PM UTC-7, mat taylor wrote:
>
> Is it possible to query the database from a script field by instantiating
> a java client and issuing a get request?
> Are there any examples of this?
>
> Thanks
> Mat
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a0f57ffc-cecf-4bc8-8082-9f5737faea87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.