Reputation: 978
I have an index containing thousands of documents, each one of them having a full text field.
I want to search through all those fields and fetch the 10 most common words that come back most often.
I would also like a way of visualizing it on Kibana if that's possible.
Upvotes: 3
Views: 3502
Reputation: 3212
The most common way to achieve that is to duplicate your full text field with a keyword datatype
. That will get you able to make terms aggregation
on that field - doc here. Maybe you could consider to do a significant term aggregation
- doc here, thus to avoid the presence of stopwords and common words. In ES 6.x you could use also the significant text aggregation
- doc here, without create the keyword
field, but i never try it, i don't know how it works. Instead if you need to retrieve the frequency of the words for each document, you should use the termvector
- doc here
Upvotes: 4