import { NodeType, TermTermType } from '@hestia-earth/schema';
export declare type searchableType = NodeType.Cycle | NodeType.Source;
export declare const searchableTypes: searchableType[];
declare type multiMatchType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix';
declare type multiMatchAnalyzer = 'standard';
export interface ISearchFilters {
    [key: string]: (string | number)[];
}
export declare const serializeSearchFilters: (filters: ISearchFilters) => string;
export declare const deserializeSearchFilters: (filters: string) => ISearchFilters;
export declare const matchType: (type: NodeType | string) => Readonly<{
    match: {
        '@type': string;
    };
}>;
export declare const matchTermType: (termType: TermTermType | string) => Readonly<{
    match: {
        termType: string;
    };
}>;
export declare const matchRegex: (key: string, value: string | RegExp) => Readonly<{
    regexp: {
        [x: string]: {
            value: string;
        };
    };
}>;
export declare const matchQuery: (key: string, value: any, boost?: number) => Readonly<{
    match: {
        [x: string]: {
            boost?: number;
            query: any;
        };
    };
}>;
export declare const matchExactQuery: (key: string, value: any, boost?: number) => Readonly<{
    match: {
        [x: string]: {
            boost?: number;
            query: any;
        };
    };
}>;
export declare const matchNameNormalized: (query: string, boost?: number) => Readonly<{
    match: {
        nameNormalized: {
            query: string;
            boost: number;
        };
    };
}>;
export declare const numberGte: (key: string, value: number) => Readonly<{
    range: {
        [x: string]: {
            gte: number;
        };
    };
}>;
export declare const multiMatchQuery: (query: string, fields: string[], type?: multiMatchType, boost?: number, analyzer?: multiMatchAnalyzer) => Readonly<{
    multi_match: {
        analyzer?: "standard";
        boost?: number;
        query: string;
        fields: string[];
        type: multiMatchType;
    };
}>;
export declare const matchPhraseQuery: (query: string, boost?: number, ...fields: string[]) => Readonly<{
    match: {
        [x: string]: {
            boost?: number;
            query: any;
        };
    };
}> | Readonly<{
    multi_match: {
        analyzer?: "standard";
        boost?: number;
        query: string;
        fields: string[];
        type: multiMatchType;
    };
}>;
export declare const matchPhrasePrefixQuery: (query: string, boost?: number, ...fields: string[]) => Readonly<{
    multi_match: {
        analyzer?: "standard";
        boost?: number;
        query: string;
        fields: string[];
        type: multiMatchType;
    };
}> | Readonly<{
    match_phrase_prefix: {
        nameSearchAsYouType: {
            query: string;
            boost: number;
        };
    };
}>;
export declare const matchBoolPrefixQuery: (query: string, boost?: number, ...fields: string[]) => Readonly<{
    multi_match: {
        analyzer?: "standard";
        boost?: number;
        query: string;
        fields: string[];
        type: multiMatchType;
    };
}> | Readonly<{
    match_bool_prefix: {
        name: {
            query: string;
            boost: number;
        };
    };
}>;
export declare const wildcardQuery: (query: string, boost?: number, ...fields: string[]) => Readonly<{
    simple_query_string: {
        query: string;
        fields: string[];
        analyze_wildcard: boolean;
        boost: number;
    };
}>;
export declare const matchGlobalRegion: {
    regexp: {
        '@id': string;
    };
};
export declare const matchCountry: Readonly<{
    bool: {
        should: ({
            match: {
                gadmLevel: number;
            };
        } | {
            regexp: {
                '@id': string;
            };
        })[];
        minimum_should_match: number;
    };
}>;
export declare const countriesQuery: Readonly<{
    bool: {
        must: ({
            match: {
                gadmLevel: number;
            };
        } | Readonly<{
            match: {
                '@type': string;
            };
        }> | Readonly<{
            match: {
                termType: string;
            };
        }>)[];
    };
}>;
export declare const allCountriesQuery: Readonly<{
    bool: {
        should: ({
            match: {
                gadmLevel: number;
            };
        } | {
            regexp: {
                '@id': string;
            };
        })[];
        minimum_should_match: number;
        must: (Readonly<{
            match: {
                '@type': string;
            };
        }> | Readonly<{
            match: {
                termType: string;
            };
        }>)[];
    };
}>;
export declare const matchRegion: Readonly<{
    range: {
        [x: string]: {
            gte: number;
        };
    };
}>;
export declare const regionsQuery: Readonly<{
    bool: {
        must: (Readonly<{
            match: {
                '@type': string;
            };
        }> | Readonly<{
            match: {
                termType: string;
            };
        }> | Readonly<{
            range: {
                [x: string]: {
                    gte: number;
                };
            };
        }>)[];
    };
}>;
export declare const worldRegion: Readonly<{
    '@id': string;
    name: string;
}>;
export declare const cropsQuery: Readonly<{
    bool: {
        must: (Readonly<{
            match: {
                '@type': string;
            };
        }> | Readonly<{
            match: {
                termType: string;
            };
        }>)[];
    };
}>;
export declare const matchAggregatedQuery: Readonly<{
    match: {
        [x: string]: {
            boost?: number;
            query: any;
        };
    };
}>;
export declare const matchNestedKey: (key: string, query: any) => any;
/**
 * List of fields to return in the search results.
 */
export declare const searchResultsFields: {
    [type in searchableType]: string[];
};
export declare const searchQuery: (type: searchableType, query?: string, filters?: ISearchFilters, aggregated?: boolean) => {
    bool: any;
};
export {};
