Field caps api - report back if fields are single-valued or not.#80730
Field caps api - report back if fields are single-valued or not.#80730markharwood wants to merge 14 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-search (Team:Search) |
6419956 to
072fe96
Compare
263424e to
bfe1b70
Compare
|
One consideration @cbuescher raised is that inspecting index stats in this way will have some inaccuracies when it comes to deleted docs. The worst-case scenario is that an index with a rogue multi-valued doc that was changed to be single-valued will still report the whole index as multi-valued until the old deleted doc is merged out. |
Performance feedback@original-brownbear was kind enough to perform some benchmarking on a large installation (15k shards) and was not able to measure any performance difference on the field caps api between this PR and previous versions. |
bfe1b70 to
491fa09
Compare
Out of curiosity how many mapped fields per shard did the benchmark have, and did the index have actual data for each of these fields? |
This was Beats indices (mix of Audit, Metric- etc.) so I'd say on average ~2k fields per index.
This was benchmarked using a variation of the Observability logging track. I do not believe that there was data present for all fields. Looking at the code again now that you mention it (sorry completely missed checking the number field mapper implementation here), whether or not we have data (and also how much of it?) seems to be massively important here. |
6fd5650 to
905f426
Compare
905f426 to
fde413e
Compare
9638fbf to
203a28d
Compare
Inspects index contents in some cases to reveal if all docs hold single values or not for a field. Relates to elastic#58523
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
Closing here since in this form the PR is outdated. |
Inspects index contents for each requested field to reveal if all docs hold single values or not.
Expected to be useful information for clients e.g. helping Kibana understand if it ever makes sense to AND different values from the same field when constructing drill-down queries.
Relates to #58523