Hey,
I'm currently looking for a way to do HTTP requests from a Painless script.
Is that possible? Because i have not seen any examples of it when searching for it.
Use case:
Basically what i'm trying to do is runtime fields where i want to generate image and link fields, and to get this data i need to do API calls. It's not something used in prod, just for internal use (for Quepid).
Here is an example of how i want to execute the script:
PUT my-index/_mapping
{
"runtime": {
"image": {
"type": "keyword",
"script": {
"source":
"""
// HTTP request should happen here and then emit the image URL
"""
}
},
"link": {
"type": "keyword",
"script": {
"source":
"""
// HTTP request should happen here and then emit the link URL
"""
}
},
}
}
Thanks in advance