문제

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