I am almost new to ElasticSearch, and need to do a simple task. I want to
count the frequency of a word in a single document (not the number of
documents containing a term). Assume that my index consists of a single
document.
You can do this, but it involves scripting and is perhaps not very simple.
The frequency of a term in a document is given as
_index['FIELD']['TERM'].tf()
Combine this with a script field:
If you are willing to take the risk to enable dynamic scripting on your
box it can be done like this
fredag 13. mars 2015 19.32.00 UTC+1 skrev reza sadoddin følgende:
I am almost new to Elasticsearch, and need to do a simple task. I want to
count the frequency of a word in a single document (not the number of
documents containing a term). Assume that my index consists of a single
document.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.