Allow doc-values only search on keyword fields#82846
Conversation
server/src/main/java/org/elasticsearch/index/mapper/TermBasedFieldType.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/TermBasedFieldType.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/TermBasedFieldType.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/TermBasedFieldType.java
Show resolved
Hide resolved
|
Pinging @elastic/es-search (Team:Search) |
|
Thanks @jpountz! |
| super(name, isIndexed, isStored, hasDocValues, textSearchInfo, meta); | ||
| } | ||
|
|
||
| protected boolean allowDocValueBasedQueries() { |
There was a problem hiding this comment.
I was wondering about this new method: I initially thought this is an additional user knob to turn doc_value queries on and off, based on its naming (similar to allow expensive queries). I think I misunderstood and it only has to do with the fact that some field types that inherit from TermBasedFieldType don't support docvalue based queries, correct?
There was a problem hiding this comment.
Yeah, I changed my mind on this one while working on a follow-up. It disappears actually in the follow-up, see #82925 (wait with review until full CI run). I was expecting some reuse in follow-ups, but that turned out more difficult, so I removed this extra abstraction
There was a problem hiding this comment.
++ sounds good thanks I will have a look when ready for review.
Similar to #82409, but for keyword fields.
Allows searching on keyword fields when those fields are not indexed (index: false) but just doc values are enabled.
This enables searches on archive data, which has access to doc values but not index structures. When combined with searchable snapshots, it allows downloading only data for a given (doc value) field to quickly filter down to a select set of documents.
Relates #81210 and #52728