0 hits from FacetedSearch when not specifying doc_types
See original GitHub issueI’m trying something simple to see if I can get it working: (I’m on 5.1)
class DogSearch(FacetedSearch):
fields = ['fleas']
facets = {
'fleas': TermsFacet(field='fleas'),
}
index = [settings.ASSOCIATIONS_INDEX_NAME]
rs = DogSearch()
response = rs.execute()
But I’m getting 0 hits when I know there are lots of results.
Here’s what it’s generating when I run it:
{"query": {"match_all": {}}, "aggs": {"_filter_fleas": {"filter": {"match_all": {}}, "aggs": {"fleas": {"terms": {"field": "fleas"}}}}}, "highlight": {"fields": {"fleas": {}}}}
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]},"aggregations":{"_filter_fleas":{"doc_count":0,"fleas":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]}}}}
Could something be going wrong in the query, or am I just using this wrong?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Faceted Search and Customized Search Filtering
Faceted search is a search mechanism that allows search results to be narrowed down by applying a set of filters to the result...
Read more >python - Elasticsearch boolean facets returned as wrong type
What am I doing wrong here? How can we make the facet values for a Boolean field deserialize correctly in the facets, as...
Read more >Getting and Using Facet Information in Amazon CloudSearch
You can get facet information for any facet-enabled field by specifying the facet.FIELD parameter in your search request. By default, Amazon CloudSearch returns ......
Read more >Elasticsearch DSL Documentation - Read the Docs
Pre-built Faceted Search. If you have your Documents defined you can very easily create a faceted search class to simplify searching and.
Read more >Faceted Search — Elasticsearch DSL 7.4.0 documentation
RangeFacet: allows you to define your own ranges for a numerical fields: RangeFacet(field="comment_count", ranges=[("few", (None, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
use
None
fordoc_types
then, I will change it to be the defaultOh okay, is there an alternative I can use to target all types without manually listing them?