File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 3
3
Changelog
4
4
=========
5
5
6
+ 0.0.9 (dev)
7
+ -----------
8
+ * ``FacetedSearch `` now uses its own ``Facet `` class instead of built in
9
+ aggregations
10
+
6
11
0.0.8 (2015-08-28)
7
12
------------------
8
13
* ``0.0.5 `` and ``0.0.6 `` was released with broken .tar.gz on pypi, just a build fix
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ declaring a ``FacetedSearch`` subclass:
31
31
32
32
``facets ``
33
33
dictionary of facets to display/filter on. The key is the name displayed and
34
- values should be a (non nesting) bucket aggregations , for example: ``{'tags':
35
- Terms{ field='tags'}} ``
34
+ values should be instances of any `` Facet `` subclass , for example: ``{'tags':
35
+ TermsFacet( field='tags') ``
36
36
37
37
Advanced
38
38
~~~~~~~~
@@ -82,8 +82,7 @@ Example
82
82
83
83
from datetime import date
84
84
85
- from elasticsearch_dsl import FacetedSearch
86
- from elasticsearch_dsl.aggs import Terms, DateHistogram
85
+ from elasticsearch_dsl import FacetedSearch, TermsFacet, DateHistogramFacet
87
86
88
87
class BlogSearch (FacetedSearch ):
89
88
doc_types = [Article, ]
@@ -92,8 +91,8 @@ Example
92
91
93
92
facets = {
94
93
# use bucket aggregations to define facets
95
- ' tags' : Terms (field = ' tags' ),
96
- ' publishing_frequency' : DateHistogram (field = ' published_from' , interval = ' month' )
94
+ ' tags' : TermsFacet (field = ' tags' ),
95
+ ' publishing_frequency' : DateHistogramFacet (field = ' published_from' , interval = ' month' )
97
96
}
98
97
99
98
def search (self ):
You can’t perform that action at this time.
0 commit comments