I have three indexes, all three of them share a particular key-value pair. When I do a blanket search with the api "http://localhost:9200/_search" using the request body
{"query":{
"query_string":
{
"query":"city*"
}
}
}
It is only returning results from two of the indexes. I tried using the same request body by altering the url to search only in that missed index "http://localhost:9200/index_name/_search" and that's working. Am I missing anything here?
The code for inserting all three indexes follow the same procedure and I used elasticsearch-py to ingest the data.
I'm using the GET HTTP method and also tried the POST HTTP method. Both returns the same results. Elasticsearch version is 7.6.0.
Results for specific index search is like the one below
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1.0,
"hits": [
{
"_index": "index_name",
"_type": "meta",
"_id": "LMRqDnIBh5wU6Ax_YsOD",
"_score": 1.0,
"_source": {
"table_schema": "test_table",
"table_name": "citymaster_old"
}
}
]
}
}