Describe the bug
The flat object field type currently reimplements most of the query-generation methods with code that was copied from KeywordField. Since then, KeywordField had changes to support dynamically switching between indexed fields and doc values to implement these query types, based on which is likely to be more efficient.
Since the flat object field is implemented with a pair of KeywordFields under the hood, we should just ask those fields to create their own darned queries, which will do the correct, optimized thing, and reduce code duplication.