问题
I have a simple question that is it possible to get hit counts in a document. like if we search "risk" could we get the count of risk in the matched document.
回答1:
You can use highlighting and count the snippets. Make sure you have termVectors enabled for the affected fields and understand the highlighting options.
You could also use the TermVectorComponent, it's currently not directly addressable via SolrNet though.
来源:https://stackoverflow.com/questions/4143896/is-there-a-way-to-get-hit-counts-in-solr