interface BoolQueryConfig {
must?: Query | Query[];
filter?: Query | Query[];
should?: Query | Query[];
must_not?: Query | Query[];
minimum_should_match?: number | string;
boost?: number;
}
const query: BoolQuery = {
bool: {
filter: { match_all: { boost: 1 } },
},
}
Type '{ filter: { match_all: { boost: number; }; }; }' is not assignable to type 'BoolQueryConfig'.
Types of property 'should' are incompatible.
Type 'Assertion' is not assignable to type 'Query | Query[] | undefined'.
Type 'Assertion' is missing the following properties from type 'Query[]': pop, push, concat, join, and 25 more.
const query: BoolQuery = {
bool: {
should: undefined,
filter: { match_all: { boost: 1 } },
},
}