Elasticsearch get top words of each document by custom function

I have a list of common words in English language

Each word has a rating

i need to get top 10 words of each document sorted by highest result of
wordCount * wordRatio

I think this should be done at indexing

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/33d0be41-db01-4581-8f58-852a78098413%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.