I have a text field which has large text values. I do a query, get my hits, highlights, all good.
There's just one more thing I want. For each hit of my SIZE hits, I want the term frequency of the query term(s) within the specific document text field.
I've seen many requests for this but they always seem to trail off without a resolution.
In the worst case, being able to execute a query where the scoring function was purely term frequency would probably also work. Again, I find all these examples on how to script your TF-IDF, IDF, and other things, but all attemps for me have failed. Hoping someone can give me an example.
Unfortunately the _termvectors query isn't useful because there's no way to limit the returned data to specific terms, or to specify multiple document IDs. If there were something like that where I could query 10 document IDs for their respective hits on just one search term (or several if I'm dealing with stemming or other things and want more data), that would potentially also work. Of course it's a two query minimum then for data I really just want with my search query hits.
Either way, I'm desperate. Ideally I want term frequency within individual document text fields for a set of document IDs and text terms.
Thanks