When I run a completion suggester I'm getting different results each time I send the same query over the same static data.
I realize that this may be an optimization for search...because users don't always need all the completions.
This is on a vintage 7.1.1 with two shards, and I'm always getting success on both shards.
I'm looking for terms that start with "/FontIdentifier->"
I know from the data that I should be getting at least: /FontIdentifier->/Checksum, /FontIdentifier->/Family, /FontIdentifier->/Foundry, /FontIdentifier->/Kind, /FontIdentifier->/Type, /FontIdentifier->/Version
The results I'm seeing, though, generally contain 3 items, normally always /FontIdentifier->/Checksum, but then sometimes /FontIdentifier->/Foundry or /FontIdentifier->/Type or something else.
Each document that contains /FontIdentifier should roughly have all of the above. I'm storing each value as a keyword in a multi-valued field (see below).
This is the query:
GET file-observatory-eval-three-20210806/_search
{
"_source": false,
"suggest": {
"fontIdentifier": {
"prefix": "/FontIdentifier->",
"completion": {
"field": "q_parent_and_keys.completion",
"size": 1000000,
"skip_duplicates": true
}
}
}
}
This is the config for this field:
"q_parent_and_keys": {
"type": "keyword",
"store": "true",
"fields": {
"case": {
"type": "keyword",
"normalizer": "lc_normalizer"
},
"completion": {
"type": "completion",
"analyzer": "whitespace"
}
}
},
Is this a bug or a feature? Is there anything I can do with the schema or how I'm indexing the data to get what I need?
Or, is there an alternative way outside of the suggester to get all terms that match a prefixquery?