1
1
/**
2
2
export * Sort by constants
3
3
*/
4
- export declare const SORT_BY_TYPE_FIELD = 1 ;
5
- export declare const SORT_BY_TYPE_NESTED = 2 ;
4
+ export declare const SORT_BY_TYPE_FIELD = "field" ;
5
+ export declare const SORT_BY_TYPE_NESTED = "nested" ;
6
+ export declare const SORT_BY_TYPE_SCORE = "score" ;
7
+ export declare const SORT_BY_TYPE_DISTANCE = "distance" ;
8
+ export declare const SORT_BY_TYPE_FUNCTION = "function" ;
9
+ export declare const SORT_BY_TYPE_RANDOM = "random" ;
6
10
export declare const SORT_BY_ASC = "asc" ;
7
11
export declare const SORT_BY_DESC = "desc" ;
8
12
export declare const SORT_BY_MODE_AVG = "avg" ;
@@ -11,51 +15,37 @@ export declare const SORT_BY_MODE_MIN = "min";
11
15
export declare const SORT_BY_MODE_MAX = "max" ;
12
16
export declare const SORT_BY_MODE_MEDIAN = "median" ;
13
17
export declare const SORT_BY_SCORE : {
14
- _score : {
15
- order : string ;
16
- } ;
18
+ type : string ;
17
19
} ;
18
20
export declare const SORT_BY_RANDOM : {
19
- random : {
20
- order : string ;
21
- } ;
21
+ type : string ;
22
22
} ;
23
23
export declare const SORT_BY_AL_TUN_TUN : {
24
- random : {
25
- order : string ;
26
- } ;
24
+ type : string ;
27
25
} ;
28
26
export declare const SORT_BY_ID_ASC : {
29
- "uuid.id" : {
30
- order : string ;
31
- } ;
27
+ field : string ;
28
+ order : string ;
32
29
} ;
33
30
export declare const SORT_BY_ID_DESC : {
34
- "uuid.id" : {
35
- order : string ;
36
- } ;
31
+ field : string ;
32
+ order : string ;
37
33
} ;
38
34
export declare const SORT_BY_TYPE_ASC : {
39
- "uuid.type" : {
40
- order : string ;
41
- } ;
35
+ field : string ;
36
+ order : string ;
42
37
} ;
43
38
export declare const SORT_BY_TYPE_DESC : {
44
- "uuid.type" : {
45
- order : string ;
46
- } ;
39
+ field : string ;
40
+ order : string ;
47
41
} ;
48
42
export declare const SORT_BY_LOCATION_KM_ASC : {
49
- _geo_distance : {
50
- order : string ;
51
- unit : string ;
52
- } ;
43
+ type : string ;
44
+ unit : string ;
53
45
} ;
54
46
export declare const SORT_BY_LOCATION_MI_ASC : {
55
- _geo_distance : {
56
- order : string ;
57
- unit : string ;
58
- } ;
47
+ type : string ;
48
+ unit : string ;
59
49
} ;
60
50
import { Coordinate } from "../Model/Coordinate" ;
61
51
import { Filter } from "./Filter" ;
@@ -122,6 +112,15 @@ export declare class SortBy {
122
112
* @return {SortBy }
123
113
*/
124
114
byNestedFieldAndFilter ( field : string , order : string , filter : Filter , mode ?: string ) : SortBy ;
115
+ /**
116
+ * Sort by function
117
+ *
118
+ * @param func
119
+ * @param order
120
+ *
121
+ * @return {SortBy }
122
+ */
123
+ byFunction ( func : string , order : string ) : SortBy ;
125
124
/**
126
125
* Is sorted by geo distance
127
126
*
0 commit comments