Define a callback to fetch results if none found

Not within elasticsearch. You could potentially write a plugin that does
that, expose your own REST endpoint (assuming you only care about REST)
which works in a similar manner to the search endpoint, and goes and fetches
the relevant data.

Personally, I don't think that such logic belongs in elasticsearch.

On Sun, Aug 28, 2011 at 9:22 AM, Christopher Grebs cgrebs@googlemail.comwrote:

Hey there,

I am working on a web service that fetches data from various web
services and implements on top of them one common API and other
things. Next to fetching data I also aggregate data from various
places and now I am wondering if there is some mode or way to tell
elasticsearch "Call this url if you find nothing" - this callback
would be some service of mine that returns data exactly the way
elasticsearch does.

So that it queries the callback exactly the way it would query another
node (afair this is done with REST too, isn't it?) but the callback
returns some other aggregated data.

Are there some way to achieve this?

Regards,
Christopher.