Meant this part: m...@mahe-laptop:~$ GET ' http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q={!boostb=blogRank v=$qq}&qq=title:solr&debugQuery=on' <?xml version="1.0" encoding="UTF-8"?> <response>
<lst name="responseHeader"> <int name="status">0</int> <int name="QTime">121</int> <lst name="params"> <str name="qq">title:solr</str> <str name="start">0</str> <str name="indent">on</str> <str name="q">{!boost b=blogRank v=$qq}</str> <str name="debugQuery">on</str> <str name="rows">100</str> </lst> </lst> <result name="response" numFound="5" start="0"> <doc> <int name="blogId">3</int> <str name="pkId">4</str> </doc> <doc> <int name="blogId">1</int> <str name="pkId">1</str> </doc> <doc> <int name="blogId">1</int> <str name="pkId">2</str> </doc> <doc> <int name="blogId">4</int> <str name="pkId">5</str> </doc> <doc> <int name="blogId">2</int> <str name="pkId">3</str> </doc> </result> <lst name="debug"> <str name="rawquerystring">{!boost b=blogRank v=$qq}</str> <str name="querystring">{!boost b=blogRank v=$qq}</str> <str name="parsedquery">BoostedQuery(boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)))</str> <str name="parsedquery_toString">boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/))</str> <lst name="explain"> <str name="4"> 5.7488723 = (MATCH) boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)), product of: 1.9162908 = (MATCH) fieldWeight(title:solr in 13), product of: 2.0 = tf(termFreq(title:solr)=4) 1.9162908 = idf(docFreq=5, numDocs=5) 0.5 = fieldNorm(field=title, doc=13) 3.0 = float(blogRank{type=blogRankFile,properties=})=3.0 </str> <str name="1"> 3.8325815 = (MATCH) boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)), product of: 1.9162908 = (MATCH) fieldWeight(title:solr in 10), product of: 1.0 = tf(termFreq(title:solr)=1) 1.9162908 = idf(docFreq=5, numDocs=5) 1.0 = fieldNorm(field=title, doc=10) 2.0 = float(blogRank{type=blogRankFile,properties=})=2.0 </str> <str name="2"> 3.3875556 = (MATCH) boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)), product of: 1.6937778 = (MATCH) fieldWeight(title:solr in 11), product of: 1.4142135 = tf(termFreq(title:solr)=2) 1.9162908 = idf(docFreq=5, numDocs=5) 0.625 = fieldNorm(field=title, doc=11) 2.0 = float(blogRank{type=blogRankFile,properties=})=2.0 </str> <str name="5"> 1.8746685 = (MATCH) boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)), product of: 1.8746685 = (MATCH) fieldWeight(title:solr in 14), product of: 2.236068 = tf(termFreq(title:solr)=5) 1.9162908 = idf(docFreq=5, numDocs=5) 0.4375 = fieldNorm(field=title, doc=14) 1.0 = float(blogRank{type=blogRankFile,properties=})=1.0 </str> <str name="3"> 1.6595565 = (MATCH) boost(title:solr,FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)), product of: 1.6595565 = (MATCH) fieldWeight(title:solr in 12), product of: 1.7320508 = tf(termFreq(title:solr)=3) 1.9162908 = idf(docFreq=5, numDocs=5) 0.5 = fieldNorm(field=title, doc=12) 1.0 = float(blogRank{type=blogRankFile,properties=})=1.0 </str> </lst> <str name="QParser">LuceneQParser</str> <str name="boost_str">blogRank</str> <str name="boost_parsed">org.apache.solr.search.function.FileFloatSource:FileFloatSource(field=blogRank,keyField=blogId,defVal=0.0,dataDir=/srv/solr/test/data/)</str> <lst name="timing"> <double name="time">106.0</double> <lst name="prepare"> <double name="time">55.0</double> <lst name="org.apache.solr.handler.component.QueryComponent"> <double name="time">53.0</double> </lst> <lst name="org.apache.solr.handler.component.FacetComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.MoreLikeThisComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.HighlightComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.StatsComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.DebugComponent"> <double name="time">0.0</double> </lst> </lst> <lst name="process"> <double name="time">50.0</double> <lst name="org.apache.solr.handler.component.QueryComponent"> <double name="time">42.0</double> </lst> <lst name="org.apache.solr.handler.component.FacetComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.MoreLikeThisComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.HighlightComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.StatsComponent"> <double name="time">0.0</double> </lst> <lst name="org.apache.solr.handler.component.DebugComponent"> <double name="time">7.0</double> </lst> </lst> </lst> </lst> </response> On Sat, Apr 25, 2009 at 12:49 AM, Marcus Herou <marcus.he...@tailsweep.com>wrote: > Cool! > > GET ' > http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q={!boost<http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q=%7B%21boost>b=blogRank > v=$qq}&qq=title:solr&debugQuery=on' > > On Sat, Apr 25, 2009 at 12:43 AM, Marcus Herou <marcus.he...@tailsweep.com > > wrote: > >> That seems wise... PageRank * Text-based Scoring. >> >> So you mean in my stupid case that: >> GET ' >> http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q={!boost<http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q=%7B%21boost>b=blogRank >> v=$qq}&qq=*:*' >> would yield the same results as: >> GET " >> http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q=*:*_val_:\"log(blogRank)\"" >> >> since I have no text data >> >> but if I introduce a tokenized textfield (title). >> Example: >> >> <add> >> <doc><field name="blogId">1</field><field name="title">solr solr >> solr</field></doc> >> >> >> <doc><field name="blogId">2</field><field name="title">solr/field></doc> >> </add> >> >> where blogId=1 had blogRank of 1 >> where blogId=2 had blogRank of 2 >> and if I searched for "solr" >> GET ' >> http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q={!boost<http://127.0.0.1:8110/solr/test/select?indent=on&start=0&rows=100&q=%7B%21boost>b=blogRank >> v=$qq}&qq=title:solr' >> >> I might get blogId=1 as nr1 in the results even though it had lower >> blogRank due to the higher frequency of the term "solr" ? >> >> Did I understand this correctly ? >> >> //Marcus >> >> >> >> On Sat, Apr 25, 2009 at 12:07 AM, Yonik Seeley < >> yo...@lucidimagination.com> wrote: >> >>> You probably want to mix the custom score with the normal relevancy >>> score... to add, use a normal boolean query. To multiply, check out >>> boosted query: >>> >>> http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlugin.html >>> >>> For other options, use a more complex function query with the new >>> query() capability (need to use 1.4 trunk for that though). >>> >>> Examples: >>> >>> &q={!boost b=myScore v=$qq}&qq=my normal lucene query >>> OR for a dismax relevancy query, >>> &q={!boost b=myScore v=$qq}&qq={!dismax qf=text_all pf=text_all}solr >>> rocks >>> >>> If the {! type of syntax looks new, check out >>> http://wiki.apache.org/solr/LocalParams >>> powerful stuff! >>> >>> -Yonik >>> http://www.lucidimagination.com >>> >> >> >> >> -- >> Marcus Herou CTO and co-founder Tailsweep AB >> +46702561312 >> marcus.he...@tailsweep.com >> http://www.tailsweep.com/ >> http://blogg.tailsweep.com/ >> > > > > -- > Marcus Herou CTO and co-founder Tailsweep AB > +46702561312 > marcus.he...@tailsweep.com > http://www.tailsweep.com/ > http://blogg.tailsweep.com/ > -- Marcus Herou CTO and co-founder Tailsweep AB +46702561312 marcus.he...@tailsweep.com http://www.tailsweep.com/ http://blogg.tailsweep.com/