Analyzing Keywords in Documents
Let’s continue with our news articles example and use the Significant Terms aggregation to identify significant keywords within the article titles.
Performing Significant Terms Aggregation
GET /news_articles/_search
{
"size": 0,
"aggs": {
"significant_keywords": {
"significant_terms": {
"field": "title",
"size": 10
}
}
}
}
Output:
{
"aggregations": {
"significant_keywords": {
"buckets": [
{
"key": "Fashion",
"doc_count": 1,
"score": 1.0
},
{
"key": "Technology",
"doc_count": 1,
"score": 1.0
},
{
"key": "Finance",
"doc_count": 1,
"score": 1.0
}
]
}
}
}
Analyzing Text Data with Term and Significant Terms Aggregations
Elasticsearch provides powerful tools for analyzing text data, allowing users to gain valuable insights from unstructured text documents. Two essential aggregations for text analysis are the Term and Significant Terms aggregations. In this article, we’ll explore what these aggregations are, how they work, their use cases, and how to implement them with examples and outputs.
Contact Us