What means “document popularity” in Solr

余生颓废 提交于 2019-12-11 08:38:43

问题


What is document popularity in solr indexing..?

EDisMax parser uses boost parameter. In the example &boost=popularity like that I noticed one query. I couldn't understand what is boost as well as boost=popularity. Before understanding the boost parameter I'd like to know what is "popularity" in document indexing.


回答1:


popularity is just "some field" which has been used as an example while boost is a query parameter defined for the edismax request handler. Boosting means to influence the scoring (the relevance of each search hit) depending on some field value (or result of some function based on field values).

See section The boost Parameter in https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser.

If you want to implement something like popularity in your own index you would have to:

  1. add a field to your schema called popularity with type int or float or ExternalFileField (depends on how you index and apply it).
  2. gather statistics data for your search results and store those in relation to the document IDs (e.g. by evaluating access logs)
  3. during index time or via ExternalFileField (or in the future via docValues partial updates) store the popularity values that you get from your statistics data.
  4. apply the boost during query time by setting the parameter boost=popularity (or using popularity in a function query).

More on popularity boosting:

https://www.safaribooksonline.com/blog/2014/11/04/implementing-popularity-boosting-in-search/

docValues partial update: https://issues.apache.org/jira/browse/SOLR-5944

ExternalFileField: http://www.findwise.com/blog/externalfilefield-in-solr/




回答2:


Boosting is used to increase the score of the certain documents. You can use index time boosting or query time boosting. For index time boosting you can set boost attribute and value to the document you index. For query time boosting you can either boost field by setting your boost value, or you can use predefined function queries.

For more information about boosting check documents in Solr wiki.

boost=popularity means that documents popularity is calculated in the external field (using ExternalFileField) and used to increase the score by using popularity value. Popularity of the documents can be calculated using the view count or any other parameters you want.For more about boosting documents by popularity you can check this document.



来源:https://stackoverflow.com/questions/13677841/what-means-document-popularity-in-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!