What is the best way to proceed?


(Garth) #1

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


(Nick Hoffman) #2

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.

(Garth) #3

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.

(Garth) #4

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.

(Shay Banon) #5

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.

(system) #6