开发者

How do I store tags associated with a document in Solr and retrieve their frequency in aggregate?

开发者 https://www.devze.com 2023-01-24 15:19 出处:网络
I am using Solr to index documents from a wiki. Each document has a unique id, title, body content and some other fields.

I am using Solr to index documents from a wiki. Each document has a unique id, title, body content and some other fields.

Firstly, I wanted to know the declaration in the Solr schema to store the multivalued field "tags" to hold n of these strings, attached to the document. Each document can have a set of tags applied on it.

Second, the use 开发者_运维问答case - how exactly would I retrieve all distinct tags across the entire Solr instance with number of occurences, so that I can build a tag cloud of most popular tags?

thanks Amit

0

精彩评论

暂无评论...
验证码 换一张
取 消