UNPKG

1.24 kBTypeScriptView Raw
1/**
2 * Provides the ability to specify facets for a search query.
3 *
4 * @category Full Text Search
5 */
6export declare class SearchFacet {
7 protected _data: any;
8 constructor(data: any);
9 toJSON(): any;
10 static term(field: string, size: number): TermSearchFacet;
11 static numeric(field: string, size: number): NumericSearchFacet;
12 static date(field: string, size: number): DateSearchFacet;
13}
14/**
15 * Provides ability to request a term facet.
16 *
17 * @category Full Text Search
18 */
19export declare class TermSearchFacet extends SearchFacet {
20 /**
21 * @internal
22 */
23 constructor(field: string, size: number);
24}
25/**
26 * Provides ability to request a numeric facet.
27 *
28 * @category Full Text Search
29 */
30export declare class NumericSearchFacet extends SearchFacet {
31 /**
32 * @internal
33 */
34 constructor(field: string, size: number);
35 addRange(name: string, min?: number, max?: number): NumericSearchFacet;
36}
37/**
38 * Provides ability to request a date facet.
39 *
40 * @category Full Text Search
41 */
42export declare class DateSearchFacet extends SearchFacet {
43 /**
44 * @internal
45 */
46 constructor(field: string, size: number);
47 addRange(name: string, start?: Date, end?: Date): DateSearchFacet;
48}