I have URLS with tags associated with them in my database, like below

url : tag1(score) tag2(score)

eg:

www.w3schools.com: html(4.5) php(3.5) etc..
www.php.net: php(5) etc...

now, i'd like to store these links in solr with the weighted tags, and make them searchable,

How can this be done in solr? `

有帮助吗?

解决方案

You could use index-time per-field boost, like so:

<add>
  <doc>
    <field name="URL">stackoverflow.com</field>
    <field name="tag" boost="11.0">html</field>
    <field name="tag" boost="9.0">php</field>
  </doc>
</add>

The documentation is available here.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top