ElasticSearch GET vs POST Search Results for Querystring -


why getting different results these 2 types of queries. 1st query return 17 results, 2nd 1 returns 300+ records.

also tried setting query value second string "a&b", seeing same result differences.

get

get  dev/data,legacydata/_search?q="a%26b" 

post

post dev/data,legacydata/_search {    "from": 0,    "size": 1000,    "query": {       "query_string": {          "query": "a&b"       }    } } 

when using double quotes in q query,

it represents exact filter

get  dev/data,legacydata/_search?q="a%26b" 

its equivalent post query is

post dev/data,legacydata/_search {    "from": 0,    "size": 1000,    "query": {       "query_string": {          "query": "\"a&b\""       }    } } 

so try following

get  dev/data,legacydata/_search?q=a%26b  post dev/data,legacydata/_search {    "from": 0,    "size": 1000,    "query": {       "query_string": {          "query": "a&b"       }    } } 

you same results


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -