What is the best way to proceed?

I would like to intercept the JSON query coming in and rewrite it,
passing off to ES to execute. Can I do this with a plugin, extend the
framework, or should I AspectJ particular Java classes of ES to make
this work.

Thanks,

Garth

If you're going to modify the query between the client and ES, I recommend
creating a web service that does this, such that:

  • The client queries the web service.
  • The web service modifies the query.
  • The web service sends the modified query to ES.
  • The web service returns the response from ES.

Yeah that's the route I really wanted to go. I have been directed to
not stand up a web service.

On Nov 16, 5:16 pm, Nick Hoffman n...@deadorange.com wrote:

If you're going to modify the query between the client and ES, I recommend
creating a web service that does this, such that:

  • The client queries the web service.
  • The web service modifies the query.
  • The web service sends the modified query to ES.
  • The web service returns the response from ES.

I have written a test client w the JavaAPI. I have not seen an API
call that would take a JSON query as if I had passed it in with Curl.
Is there one?

On Nov 16, 5:16 pm, Nick Hoffman n...@deadorange.com wrote:

If you're going to modify the query between the client and ES, I recommend
creating a web service that does this, such that:

  • The client queries the web service.
  • The web service modifies the query.
  • The web service sends the modified query to ES.
  • The web service returns the response from ES.

SearchRequestBuilder#setSource allows to pass the actual "body" of the
request. Regarding munging the query sent, its best to do it outside of
elasticsearch.

On Thu, Nov 17, 2011 at 12:42 AM, Garth ghershfield.bah@gmail.com wrote:

I have written a test client w the JavaAPI. I have not seen an API
call that would take a JSON query as if I had passed it in with Curl.
Is there one?

On Nov 16, 5:16 pm, Nick Hoffman n...@deadorange.com wrote:

If you're going to modify the query between the client and ES, I
recommend
creating a web service that does this, such that:

  • The client queries the web service.
  • The web service modifies the query.
  • The web service sends the modified query to ES.
  • The web service returns the response from ES.