Thank you very much! Your suggestion helps me a lot. After adding the copyField, solr need to be re-indexed.
Here is another problem. I have a links_no field in solr index which means how many download links this song has. I want to integrate the text relevance with the links_no. ie: mp3^5 artist album^0.4 (links_no desc)^1.2 should I re-define the boost function? How can I get this effect On Sat, Jan 31, 2009 at 6:50 AM, Koji Sekiguchi <k...@r.email.ne.jp> wrote: > fei dong wrote: > >> Hi buddy, I work on an audio search based on solr engine. I want to >> realize >> lyric search and sort by relevance. Here is my confusion. . >> My schema.xml is like this: >> <field name="id" type="string" indexed="true" stored="true" >> required="true" /> >> <field name="artist" type="text" indexed="true" stored="true"/> >> <field name="album" type="text" indexed="true" stored="true"/> >> <field name="mp3" type="text" indexed="true" stored="true"/> >> <field name="urls" type="text" indexed="false" stored="true"/> >> <field name="lyric_url" type="text" indexed="false" stored="true"/> >> <field name="lyric" type="text" indexed="true" stored="true"/> >> >> <defaultSearchField>text</defaultSearchField> >> >> <!-- SolrQueryParser configuration: defaultOperator="AND|OR" --> >> <solrQueryParser defaultOperator="AND"/> >> <copyField source="artist" dest="text"/> >> <copyField source="album" dest="text"/> >> <copyField source="mp3" dest="text"/> >> <copyField source="lyric" dest="text"/> >> ... >> http://localhost:8983/solr/select/?q=lyric:(tear<http://localhost:8983/solr/select/?q=lyric:%28tear> >> the house down)&fl=*,score&version=2.2&start=0&rows=10&indent=on >> has results >> >> http://localhost:8983/solr/select/?q=tear the house >> down&fl=*,score&version=2.2&start=0&rows=10&indent=on >> >> have no result >> http://localhost:8983/solr/select/?q=tear >> the house down&fl=*,score&qf=lyric&version=2.2&start=0&rows=10&indent=on >> have no result >> >> Q1: why the latter links not work while I have added lyric to copyField? >> >> >> > Did you re-index after adding lyric to copyField? > > Q2: I want to set the priority of song name higher ,then artist name and >> album so I try like this: >> http://localhost:8983/solr/select/?q=sweet&fl=*,score&qf=mp3^5 artist >> album^0.4&version=2.2&start=0&rows=10&indent=on >> I find the score are totally same as without the argument of qf: >> >> http://localhost:8983/solr/select/?q=sweet&fl=*,score&version=2.2&start=0&rows=10&indent=on >> >> How could I modify the sorting? >> >> >> > Try indexing-time boost: > > http://wiki.apache.org/solr/UpdateXmlMessages#head-8315b8028923d028950ff750a57ee22cbf7977c6 > > Q3: I would like to realize the effect like : >> >> http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=tear+the+house+down&lm=-1 >> highlight the fragment. Can solr give me the range of minimum of all >> keywords in an article like lyric? >> >> >> > I couldn't understand your requirement, but can you try &hl=on&hl.fl=lyric > and see what you get? > > Thank you for attention! >> >> >> > >