search_month = model.search().query(q_objects)
search_month.aggs.bucket(
source_month, 'date_histogram', field='date',
interval=date_ranges[source_month].interval,
)
response_month = search_month.execute()
Unfortunately, it gives me all data from the model - but how to show only results of aggregations - count of documents ?
Unfortunately looks like cannot use size=0 on aggregations with date_histogram . Perhaps its just elasticsearch_dsl python library problem ?
TransportError(400, 'illegal_argument_exception', '[date_histogram] unknown field [size], parser not found')
dadoonet
(David Pilato)
March 5, 2018, 4:31pm
4
I don't know this client but my guess is that it should be something like:
.search().query(q_objects).size(0)
system
(system)
Closed
April 2, 2018, 4:31pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.