I'm working on a ElasticSearch
plugin to retrieve the total frequency of a searched term. I've already created a maven project and successfully deployed my test plugin into ElasticSearch
but I have no idea how to write/override a function to perform this task.
I have found out that there is a getTotalTermFreq() function in org.elasticsearch.index.similarity.ScriptedSimilarity.Term
class/object which returns the total number of occurrences of this term in the index, or -1 if this statistic is not available. But, I have no idea how to use this function in the plugin!
I already tried looking in to other open source plugins available on github but couldn't find anything useful or I can say I didn't understand that much because of my no-experience in Java.
Can someone please help?
Thanks in advance.
0 comments:
Post a Comment