rest - ElasticSearch Not returning all results -


i have set of data

{   "took" : 2,   "timed_out" : false,   "_shards" : {     "total" : 5,     "successful" : 5,     "failed" : 0   },   "hits" : {     "total" : 16,     "max_score" : 1.0,     "hits" : [ {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100038",       "_score" : 1.0, "_source" : {"id":"100038","patientpin":"2012010000000020","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"scooby","patientlastname":"doo","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100007",       "_score" : 1.0, "_source" : {"id":"100007","patientpin":"2012010000000016","prescriptions":["methisoprinol isoprinosine"],"diagnosis":["alcohol intoxication"],"patientfirstname":"johnny","patientlastname":"bravo","documentdate":"06/10/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100015",       "_score" : 1.0, "_source" : {"id":"100015","patientpin":"2012010000000010","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"tweety","patientlastname":"bird","documentdate":"06/10/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100027",       "_score" : 1.0, "_source" : {"id":"100027","patientpin":"2012010000000014","prescriptions":[],"diagnosis":["food poisoning"],"patientfirstname":"marvin","patientlastname":"martian","documentdate":"06/11/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100046",       "_score" : 1.0, "_source" : {"id":"100046","patientpin":"2012010000000027","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"yabba","patientlastname":"doo","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100058",       "_score" : 1.0, "_source" : {"id":"100058","patientpin":"2012010000000003","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"elmer","patientlastname":"fudd","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100042",       "_score" : 1.0, "_source" : {"id":"100042","patientpin":"2012010000000021","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"scrappy","patientlastname":"doo","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100054",       "_score" : 1.0, "_source" : {"id":"100054","patientpin":"2012010000000026","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"scooby","patientlastname":"dum","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100066",       "_score" : 1.0, "_source" : {"id":"100066","patientpin":"2012010000000015","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"hippety","patientlastname":"hopper","documentdate":"06/13/2014"}     }, {       "_index" : "tenant1",       "_type" : "consultation",       "_id" : "100050",       "_score" : 1.0, "_source" : {"id":"100050","patientpin":"2012010000000002","prescriptions":[],"diagnosis":["amoebiasis"],"patientfirstname":"daffy","patientlastname":"duck","documentdate":"06/13/2014"}     } ]   } } 

however, when querying through google chromes' rest console query

{     "query" : {         "match" : {             "patientfirstname" : "scooby"         }     } } 

it returns result here's url using search

http://localhost:9200/tenant1/consultation/_search 

i did

http://localhost:9200/tenant1/consultation/_search?patientlastname:doo 

and still return results. supposed return 1 result

change query this.(add _search?q=)

http://localhost:9200/tenant1/consultation/_search?q=patientlastname:doo 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -