FilteredQuery document (Data API 17.8)

A filtered query allows to filter the result of a (possibly complex) query using a (possibly complex) filter.

Example:
    query : {
        filtered_query: {
            query: {
                text_query: { fields: ["coupon_id"], search_phrase: "disabled" }
            },
            filter: {
                term_filter: {
                    field: "enabled", operator: "is", values: [ false ]
                }
            }
        }
    }
 
Property Type Constraints Description
filter Filter {TermFilter, RangeFilter, BoolFilter, QueryFilter, Range2Filter} mandatory=true, nullable=false The (possibly complex) filter object.
query Query {TermQuery, TextQuery, BoolQuery, MatchAllQuery, FilteredQuery, NestedQuery} mandatory=true, nullable=false The query object.