Hi,
I'm wondering if someone knows how to make the ElasticSearch C# package (NEST) use the HTTP GET method instead of HTTP POST or if someone can point me in that direction.
I see from the source code that I need to somehow define a "source" on the QueryString, but I am unsure how to do so.
Basically I'm looking to end up with a search URI similar to:
https://myip.com/elasticsearch/index/event/_search?pretty&source={"from":0,"size":15,"query":{"query_string":{"query":"id:1000100721495"}},"filter":{"range":{"timestamp":{"lte":"2016-06-22T23:59:00.000","gte":"2015-06-10T00:00:00.000"}}}}
The above looks like this after being sent via the default POST method using NEST:
https://myip.com/elasticsearch/index/event/_search?pretty=true
{
"from": 0,
"size": 15,
"query": {
"query_string": {
"query": "1000100721495",
"fields": [
"id"
]
}
},
"filter": {
"range": {
"timestamp": {
"lte": "2016-06-12T23:59:00.000",
"gte": "2015-06-10T00:00:00.000"
}
}
}
}
Is this even possible using NEST?
Thanks!