import type { Query } from './Query'; /** * @type NestedQuery: Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints. A `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation. * * @property path: The path to the nested document. * - **Max Length:** 2048 * * @property query: * * @property scoreMode: Indicates how scores for matching child objects affect the root parent document’s relevance score. * */ export type NestedQuery = { path: string; query: Query; scoreMode?: NestedQueryScoreModeEnum; } & { [key: string]: any; }; export type NestedQueryScoreModeEnum = 'avg' | 'total' | 'max' | 'none';