forked from toptal/chewy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filters
78 lines (67 loc) · 1.28 KB
/
filters
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
term
name == 'value'
name != 'value'
terms
name == ['value1', 'value2'] plain
name != ['value1', 'value2']
name(:&) == ['value1', 'value2'] or
name(:|) == ['value1', 'value2'] and
name(:b) == ['value1', 'value2'] bool
name(:f) == ['value1', 'value2'] fielddata
regexp
name == /regexp/
name =~ /regexp/
name != /regexp/
name !~ /regexp/
name(:anystring, :intersection) == /regexp/
prefix
name =~ 'pref'
name !~ 'pref'
exists
name?
missing
!name
!name?
name == nil
numeric_range Numeric
range Other
date >= Date.today
date > Date.today
date <= Date.today
date < Date.today
date == (2.days.ago..3.days.since) ()
date == [2.days.ago..3.days.since] []
bool
must(name == 'name', email == 'email')
.should(name == 'name', email == 'email')
.must_not(name == 'name', email == 'email')
and
(name == 'name') & (email == 'email')
or
(name == 'name') | (email == 'email')
not
!(name == 'name')
email != 'email'
script s()
match all
match_all
has child
has_child('type').query()
has_child('type').filter()
has parent
has_parent('type').query()
has_parent('type').filter()
nested
name.nested()
query q()
type
.types()
geo bounding box
geo distance
geo distance range
geo polygon
geoshape
geohash cell
indices
ids
limit