I have two search indexes, to the best of my understanding these indexes have an identical setup, apart from their name. One index has ~1.7 million documents, the other has 8.
The documents have the following structure (this example exists in both indexes):
{
_index: "locations",
_type: "location",
_id: "Royal Leamington Spa",
_version: 1,
found: true,
_source: {
name: "Royal Leamington Spa",
coordinate: {
lat: 52.29156048773691,
lon: -1.5343337101975745
}
}
}
Both indexes have the same mapping of
<indexname>: {
settings: {
index: {
creation_date: "1427477291143",
uuid: "Z75-HWNGQwiE0MzqezVctQ",
number_of_replicas: "1",
number_of_shards: "1",
version: {
created: "1040499" //this is slightly different on each
}
}
}
}
I am querying both with the following:
POST http://<server>/locations/location/_search
{
"from": 0,
"size": 10,
"sort": [
{
"_score": {}
}
],
"query": {
"match": {
"name": {
"type": "phrase_prefix",
"query": "Royal L"
}
}
}
}
The larger of the two indexes returns no results, but the smaller index returns the document I was expecting. What causes the difference in the result and how can I query the larger index in a way that will return results for the given query?