You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Range facet allow to specify a set of ranges and get both the number of docs (count) that fall within each range, and aggregated data either based on the field, or using another field.
A filter that matches documents using AND boolean operator on other queries. This filter is more performant then bool filter. Can be placed within queries that accept a filter.
A filter that matches documents matching boolean combinations of other queries. Similar in concept to Boolean query, except that the clauses are other filters. Can be placed within queries that accept a filter.
Filters documents matching the provided document / mapping type. Note, this filter can work even when the _type field is not indexed (using the _uid field).
Filters documents where a specific field has no value in them.
155
156
156
157
'''
157
-
returncls(missing={'field':field})
158
+
returncls(missing={'field':field})
158
159
159
160
@classmethod
160
161
defnot_filter(cls, query):
@@ -163,19 +164,21 @@ def not_filter(cls, query):
163
164
A filter that filters out matched documents using a query. This filter is more performant then bool filter. Can be placed within queries that accept a filter.
Filters documents with fields that have values within a certain numeric range. Similar to range filter, except that it works only with numeric values, and the filter execution works differently.
Filters documents that have fields containing terms with a specified prefix (not analyzed). Similar to phrase query, except that it acts as a filter. Can be placed within queries that accept a filter.
Filters documents with fields that have terms within a certain range. Similar to range query, except that it acts as a filter. Can be placed within queries that accept a filter.
Copy file name to clipboardExpand all lines: elasticpy/map.py
+6-5
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,26 @@
8
8
9
9
10
10
classElasticMap(dict):
11
+
11
12
'''
12
13
Mapping is the process of defining how a document should be mapped to the Search Engine, including its searchable characteristics such as which fields are searchable and if/how they are tokenized. In ElasticSearch, an index may store documents of different "mapping types". ElasticSearch allows one to associate multiple mapping definitions for each mapping type.
13
14
14
15
Explicit mapping is defined on an index/type level. By default, there isn't a need to define an explicit mapping, since one is automatically created and registered when a new type or new field is introduced (with no performance overhead) and have sensible defaults. Only when the defaults need to be overridden must a mapping definition be provided.
15
16
'''
17
+
16
18
def__init__(self, field):
17
19
self.field=field
18
20
self[self.field] =dict()
19
21
20
-
deftype(self,type_name):
22
+
deftype(self,type_name):
21
23
'''
22
24
Assigns a particular type to a field in the mapped properties.
23
25
Available types are: string, integer/long, float/double, boolean and null
24
26
'''
25
27
self[self.field]['type'] =type_name
26
28
returnself
27
29
28
-
defanalyzed(self,should=True):
30
+
defanalyzed(self,should=True):
29
31
'''
30
32
Specifies to the map that the field should be analyzed when indexed.
31
33
'''
@@ -36,10 +38,10 @@ def ignore(self):
36
38
'''
37
39
Specifies that the field should be ignored in the index
0 commit comments