Hi ,
I have inserted some 1000 documents using a script
i=1 while [ $i -le 998 ] do curl 'localhost:9200/test_index1/test_type1/'$i'' -d'{"name":"Hi , This is XYZ from location 10.0.4.135"}' i=
expr $i + 1done
Prior to this I had created 1 shards with 0 replicas for this index
curl -X PUT "localhost:9200/test_index1" -H 'Content-Type: application/json' -d'
{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
}
}
'
Now I am performing a simple search using
curl -X GET "localhost:9200/test_index1/_search" -H 'Content-Type: application/json' -d'
{
"query": {
"query_string" : {
"default_field" : "name",
"query" : "10.0.4.135"
}
}
}
'
It does not shows all the documents with the string 10.0.4.135 but only a few -
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":549,"max_score":0.59587663,"hits":[{"_index":"test_index1","_type":"test_type1","_id":"521","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"522","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"523","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"524","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"525","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"526","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"527","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"528","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"529","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}},{"_index":"test_index1","_type":"test_type1","_id":"530","_score":0.59587663,"_source":{"name":"Hi , This is XYZ from location 10.0.4.135"}}]}}Wed Jun 6 12:42:34 IST 2018
Can anyone please help me understand the same .
Thanks