Elasticsearch aggregations significant_text without query block returns zero buckets

Viewed 20

I want to learn elasticsearch and I am following this guide:

https://github.com/LisaHJung/Part-2-Understanding-the-relevance-of-your-search-with-Elasticsearch-and-Kibana-

This command worked correctly as described in the guide, it will return buckets with significant_texts:

GET news_headlines/_search
{
    "query": {
    "match": {
        "category": "ENTERTAINMENT"
    }
    },
    "aggregations": {
    "popular_in_entertainment": {
        "significant_text": {
        "field": "headline"
        }
    }
    }
}

I thought I'd explore by trying to find significant_text against ALL documents in my index. But both these attempts gave my zero bucketed items:

GET news_headlines/_search
{
  "aggregations": {
    "popular_in_entertainment": {
      "significant_text": {
        "field": "headline"
      }
    }
  }
}
GET news_headlines/_search
{
  "query": {
    "match_all": { }
  },
  "aggregations": {
    "popular_in_entertainment": {
      "significant_text": {
        "field": "headline"
      }
    }
  }
}

What did I do wrong? Or is there something about aggregations that I don't understand?

0 Answers
Related