0

is there a way to search elastic using GET rather than POST method , since i can do this in curl

curl -XGET 'localhost:9200/tvseries/internindex/_search?size=5&from=5&pretty' -H 'Content-Type: application/json' -d'
{
  "query": {
    "bool": {
      "should": [
        { "match": { "showname":  "Family guy" }},
        { "match": { "content": "gigitty"   }}
      ]
    }
  }
}
'

and it works , how can i do the same using search api of elasticsearch.js !

Rizwan Patel
  • 538
  • 2
  • 9
  • 27
  • What's the issue with using POST? – Val Jul 14 '17 at 07:18
  • post as we know is sort of slow as compared to get ! – Rizwan Patel Jul 14 '17 at 07:24
  • Makes no difference at all :-) [POST must be used to send content and GET to retrieve content](https://stackoverflow.com/questions/34795053/es-keeps-returning-every-document/34796014#34796014). – Val Jul 14 '17 at 07:36

0 Answers0