import type { estypes } from "@elastic/elasticsearch"; import { Query } from "./search-query.js"; export type CompoundQuery = Bool | Boosting | ConstantScore | DisjunctionMax | FunctionScore; /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html */ export interface Bool { bool: { filter?: Query | Query[]; must?: Query | Query[]; must_not?: Query | Query[]; should?: Query | Query[]; minimum_should_match?: estypes.MinimumShouldMatch; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-boosting-query.html */ export interface Boosting { boosting: { positive: Query; negative: Query; negative_boost?: number; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-constant-score-query.html */ export interface ConstantScore { constant_score: { filter: Query; boost?: number; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-dis-max-query.html */ export interface DisjunctionMax { dis_max: { queries: Query[]; tie_breaker?: number; }; } /** * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html */ export interface FunctionScore { function_score: { boost_mode?: estypes.QueryDslFunctionBoostMode; functions?: FunctionScoreFunction[]; max_boost?: estypes.double; min_score?: estypes.double; query?: Query; score_mode?: estypes.QueryDslFunctionScoreMode; }; } export interface FunctionScoreFunction extends Omit { filter?: Query; } //# sourceMappingURL=compound-query.d.ts.map