Filter and extend json response


(Ridvan Gyundogan) #1

I want to extend the json response with some custom logic data, from
business specific needs. Is there a plugin mechanism or something I
can do this.

For exampe to add in the response:
{
userdata:{
"prop1":"aaaa",
"prop2":"bbbb",
}
hits:{
...........................
}
}


(Shay Banon) #2

No, you need to proxy the call to elasticsearch yourself, and add what you want. Where do you get that data from?
On Friday, February 25, 2011 at 2:10 PM, Ridvan Gyundogan wrote:

I want to extend the json response with some custom logic data, from
business specific needs. Is there a plugin mechanism or something I
can do this.

For exampe to add in the response:
{
userdata:{
"prop1":"aaaa",
"prop2":"bbbb",
}
hits:{
...........................
}
}


(Ridvan Gyundogan) #3

Hi kimchy,
thanks for the answer.

I agreee it is a better idea to proxy it, es doesn' need to care about this.
I was just curious whether it' possible to write such custom plugin, I see
you use plugins for some functionality.

The data we want to extend the response with at the moment comes from a
database, we are also thinking over the possibility to put it in a different
type in the es.

On Fri, Feb 25, 2011 at 9:55 PM, Shay Banon <shay.banon@etter
lasticsearch.com> wrote:

No, you need to proxy the call to elasticsearch yourself, and add what
you want. Where do you get that data from?

On Friday, February 25, 2011 at 2:10 PM, Ridvan Gyundogan wrote:

I want to extend the json response with some custom logic data, from
business specific needs. Is there a plugin mechanism or something I
can do this.

For exampe to add in the response:
{
userdata:{
"prop1":"aaaa",
"prop2":"bbbb",
}
hits:{
...........................
}
}


(Shay Banon) #4

There isn't an extension point for that. And, things like that shouldn't probably exist in elasticsearch.
On Saturday, February 26, 2011 at 9:23 AM, Ridvan Gyundogan wrote:

Hi kimchy,
thanks for the answer.

I agreee it is a better idea to proxy it, es doesn' need to care about this. I was just curious whether it' possible to write such custom plugin, I see you use plugins for some functionality.

The data we want to extend the response with at the moment comes from a database, we are also thinking over the possibility to put it in a different type in the es.

On Fri, Feb 25, 2011 at 9:55 PM, Shay Banon <shay.banon@etter lasticsearch.com> wrote:

No, you need to proxy the call to elasticsearch yourself, and add what you want. Where do you get that data from?
On Friday, February 25, 2011 at 2:10 PM, Ridvan Gyundogan wrote:

I want to extend the json response with some custom logic data, from
business specific needs. Is there a plugin mechanism or something I
can do this.

For exampe to add in the response:
{
userdata:{
"prop1":"aaaa",
"prop2":"bbbb",
}
hits:{
...........................
}
}


(system) #5