Making http request inside query


(Dave Clissold) #1

Is there a way of making a http request as part of the query and returning that or using it to influence the scoring?

{
"query": {
"match": { "some_field":"value"},
"httprequest":"http://someaddress?parm1=value"
}
}

What I want to do is send a request to a graph database API, get the number of likes back and then use this as the scoring for every document.

Is this possible or does it require a custom plugin being written?


(Shane Connelly) #2

This is not possible. Why not send a request to your secondary system first outside of Elasticsearch and then supply the values as part of the query?


(Dave Clissold) #3

That is what I had feared. Looks like I might have to consider doing something similar to your suggestion but in reverse, because the number of 'likes' is dependant upon the query results and the user's connections within the graph database.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.