you can use a script to find out term frequencies and more of a
particular word in a field. This feature is available since 0.90.10.
Check it out here:
You can use this either inside a function_score [1] query if you want
to use the tf to influence the score, or you can define a script field
[2] if you only want to have the information returned.
If you want to write a native script, some examples how to use that
from java are in this repository:
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.