forked from danpaz/bodybuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
63 lines (62 loc) · 1.84 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import boolFilter from './bool-filter'
import existsFilter from './exists-filter'
import fuzzyFilter from './fuzzy-filter'
import matchFilter from './match-filter'
import geoBoundingBoxFilter from './geo-bounding-box-filter'
import geoDistanceFilter from './geo-distance-filter'
import geoShapeFilter from './geo-shape-filter'
import idsFilter from './ids-filter'
import matchAllFilter from './match-all-filter'
import missingFilter from './missing-filter'
import nestedFilter from './nested-filter'
import prefixFilter from './prefix-filter'
import rangeFilter from './range-filter'
import regexpFilter from './regexp-filter'
import wildcardFilter from './wildcard-filter'
import termFilter from './term-filter'
import termsFilter from './terms-filter'
import typeFilter from './type-filter'
/**
* Construct elasticsearch filters.
*
* @namespace Filters
*
* @example
* var body = new Bodybuilder()
* .filter('missing', 'user', 'kimchy')
* .build()
*/
export default {
bool: boolFilter,
boolean: boolFilter,
exists: existsFilter,
exist: existsFilter,
fuzzy: fuzzyFilter,
match: matchFilter,
geo_bounding_box: geoBoundingBoxFilter,
geoBoundingBox: geoBoundingBoxFilter,
geoboundingbox: geoBoundingBoxFilter,
'geo-bounding-box': geoBoundingBoxFilter,
geo_distance: geoDistanceFilter,
geodistance: geoDistanceFilter,
geoDistance: geoDistanceFilter,
'geo-distance': geoDistanceFilter,
geo_shape: geoShapeFilter,
geoshape: geoShapeFilter,
geoShape: geoShapeFilter,
'geo-shape': geoShapeFilter,
ids: idsFilter,
matchAll: matchAllFilter,
matchall: matchAllFilter,
'match-all': matchAllFilter,
match_all: matchAllFilter,
missing: missingFilter,
nested: nestedFilter,
prefix: prefixFilter,
range: rangeFilter,
regexp: regexpFilter,
wildcard: wildcardFilter,
term: termFilter,
terms: termsFilter,
type: typeFilter
}