|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Solr's MLT query call doesn't workHi,
Recently, while implementing the MoreLikeThis search, I've run into the situation when Solr's mlt query calls don't work. More specifically, the following query: http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= 5&mlt.interestingTerms=details&fl=title+author+score brings back just the doc with id=10 and nothing else. While using the GetMethod approach (putting /mlt explicitely into the url), I got back some results. I've been trying to solve this problem for more than a week with no luck. If anybody has any hint, please help. Below, I put logs & outputs from 3 runs: a) Solr; b) GetMethod (/mlt); c) GetMethod (/select). Thanks a lot. Regards, Sergey Goldberg Here're the logs: a) Solr (http://localhost:8080/solr/select) 08.07.2009 15:50:33 org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt= true&mlt.interestingTerms=details&mlt.maxqt=5&wt=javabin&version=2.2} hits=1 status=0 QTime=172 INFO MLTSearchRequestProcessor:49 - SolrServer url: http://localhost:8080/solr INFO MLTSearchRequestProcessor:67 - solrQuery> q=id%3A10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= 5&mlt.interestingTerms=details&fl=title+author+score INFO MLTSearchRequestProcessor:73 - Number of docs found = 1 INFO MLTSearchRequestProcessor:77 - title = SG_Book; score = 2.098612 b) GetMethod (http://localhost:8080/solr/mlt) 08.07.2009 16:55:44 org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/mlt params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt.max qt=5&mlt.interestingTerms=details} status=0 QTime=15 INFO MLT2SearchRequestProcessor:76 - <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">0</int></lst><result name="match" numFound="1" start="0" maxScore="2.098612"><doc><float name="score">2.098612</float><arr name=" author"><str>S.G.</str></arr><str name="title">SG_Book</str></doc></result><result name="response" n umFound="4" start="0" maxScore="0.28923997"><doc><float name="score">0.28923997</float><arr name="author"><str>O. Henry</str><str>S.G.</str></arr><str name="title">Four Million, The</str></doc><doc><float name="score">0.08667877</float><arr name="author"><str>Katherine Mosby</str></arr><str name="title">The Season of Lillian Dawes</str></doc><doc><float name="score">0.07947738</float><arr name="author"><str>Jerome K. Jerome</str></arr><str name="title">Three Men in a Boat</str></doc><doc><float name="score">0.047219563</float><arr name="author"><str>Charles Oliver</str><str>S.G.</str></arr><str name="title">ABC's of Science</str></doc></result><lst name="interestingTerms"><float name="content_mlt:ye">1.0</float><float name="content_mlt:tobin">1.0</float><float name="content_mlt:a">1.0</float><float name="content_mlt:i">1.0</float><float name="content_mlt:his">1.0</float></lst> </response> c) GetMethod (http://localhost:8080/solr/select) 08.07.2009 17:06:45 org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/select params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt. maxqt=5&mlt.interestingTerms=details} hits=1 status=0 QTime=16 INFO MLT2SearchRequestProcessor:80 - <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">16</int><lst name="params"><str name="fl">title author score</str><str name="mlt.fl">content_mlt</str><str name="q">id:10</str><str name="mlt.maxqt">5</str><str name="mlt.interestingTerms">details</str></lst></lst><result name="response" numFound="1" start="0" maxScore="2.098612"><doc><float name="score">2.098612</float><arr name="author"><str>S.G.</str></arr><str name="title">SG_Book</str></doc></result><lst name="debug"><str name="rawquerystring">id:10</str><str name="querystring">id:10</str><str name="parsedq uery">id:10</str><str name="parsedquery_toString">id:10</str><lst name="explain"><str name="10"> 2.098612 = (MATCH) weight(id:10 in 3), product of: 0.99999994 = queryWeight(id:10), product of: 2.0986123 = idf(docFreq=1, numDocs=5) 0.47650534 = queryNorm 2.0986123 = (MATCH) fieldWeight(id:10 in 3), product of: 1.0 = tf(termFreq(id:10)=1) 2.0986123 = idf(docFreq=1, numDocs=5) 1.0 = fieldNorm(field=id, doc=3) </str></lst><str name="QParser">OldLuceneQParser</str><lst name="timing"><double name="time">16.0</double><lst name="prepare"><double name="time">0.0</double><lst name="org.apache.solr.handler.component.QueryComponent"><double name="time">0.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.DebugComponent"><double name="time">0.0</double></lst></lst><lst name="process"><double name="time">16.0</double><lst name="org.apache.solr.handler.component.QueryComponent"><double name="time">0.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.DebugComponent"><double name="time">16.0</double></lst></lst></lst></lst> </response> And here're the relevant entries from solrconfig.xml: <requestHandler name="standard" class="solr.SearchHandler" default="true"> <!-- default values for query parameters --> <lst name="defaults"> <str name="echoParams">explicit</str> <str name="fl">id,title,author,score</str> <str name="debugQuery">on</str> </lst> </requestHandler> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler"> <lst name="defaults"> <int name="mlt.mindf">1</int> <int name="mlt.maxqt">10</int> </lst> </requestHandler> |
|
|
Re: Solr's MLT query call doesn't workA couple of things, your mlt.fl value, must be part of fl. In this case, content_mlt is not included in fl.
I think the fl parameter value need to be comma separated. try fl=title,author,content_mlt,score -Yao
|
|
|
Re: Solr's MLT query call doesn't workSergey, What about http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= 5&mlt.interestingTerms=details&fl=title+author+score&qt=mlt ? Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: SergeyG <sgoldberg@...> > To: solr-user@... > Sent: Wednesday, July 8, 2009 9:44:20 AM > Subject: Solr's MLT query call doesn't work > > > Hi, > > Recently, while implementing the MoreLikeThis search, I've run into the > situation when Solr's mlt query calls don't work. > > More specifically, the following query: > > http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= > 5&mlt.interestingTerms=details&fl=title+author+score > > brings back just the doc with id=10 and nothing else. While using the > GetMethod approach (putting /mlt explicitely into the url), I got back some > results. > > I've been trying to solve this problem for more than a week with no luck. If > anybody has any hint, please help. > > Below, I put logs & outputs from 3 runs: a) Solr; b) GetMethod (/mlt); c) > GetMethod (/select). > > Thanks a lot. > > Regards, > Sergey Goldberg > > > Here're the logs: > > a) Solr (http://localhost:8080/solr/select) > 08.07.2009 15:50:33 org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/select > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt= > true&mlt.interestingTerms=details&mlt.maxqt=5&wt=javabin&version=2.2} hits=1 > status=0 QTime=172 > > INFO MLTSearchRequestProcessor:49 - SolrServer url: > http://localhost:8080/solr > INFO MLTSearchRequestProcessor:67 - solrQuery> > q=id%3A10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= > 5&mlt.interestingTerms=details&fl=title+author+score > INFO MLTSearchRequestProcessor:73 - Number of docs found = 1 > INFO MLTSearchRequestProcessor:77 - title = SG_Book; score = 2.098612 > > > b) GetMethod (http://localhost:8080/solr/mlt) > 08.07.2009 16:55:44 org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/mlt > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt.max > qt=5&mlt.interestingTerms=details} status=0 QTime=15 > > INFO MLT2SearchRequestProcessor:76 - > > 0 > name="QTime">0 > maxScore="2.098612">2.098612S.G. > name="title">SG_Book > umFound="4" start="0" maxScore="0.28923997"> > name="score">0.28923997O. > HenryS.G.Four Million, > The0.08667877 > name="author">Katherine MosbyThe Season > of Lillian Dawes0.07947738 > name="author">Jerome K. JeromeThree Men > in a Boat > name="score">0.047219563Charles > OliverS.G.ABC's of > Science > name="content_mlt:ye">1.0 > name="content_mlt:tobin">1.0 > name="content_mlt:a">1.0 > name="content_mlt:i">1.0 > name="content_mlt:his">1.0 > > > > c) GetMethod (http://localhost:8080/solr/select) > 08.07.2009 17:06:45 org.apache.solr.core.SolrCore execute > INFO: [] webapp=/solr path=/select > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt. > maxqt=5&mlt.interestingTerms=details} hits=1 status=0 QTime=16 > > INFO MLT2SearchRequestProcessor:80 - > > 0 > name="QTime">16title author > scorecontent_mltid:10 > name="mlt.maxqt">5 > name="mlt.interestingTerms">details > numFound="1" start="0" maxScore="2.098612"> > name="score">2.098612S.G. > name="title">SG_Book > name="rawquerystring">id:10id:10 > name="parsedq > uery">id:10id:10 > name="explain"> > 2.098612 = (MATCH) weight(id:10 in 3), product of: > 0.99999994 = queryWeight(id:10), product of: > 2.0986123 = idf(docFreq=1, numDocs=5) > 0.47650534 = queryNorm > 2.0986123 = (MATCH) fieldWeight(id:10 in 3), product of: > 1.0 = tf(termFreq(id:10)=1) > 2.0986123 = idf(docFreq=1, numDocs=5) > 1.0 = fieldNorm(field=id, doc=3) > OldLuceneQParser > name="timing">16.0 > name="time">0.0 > name="org.apache.solr.handler.component.QueryComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.FacetComponent"> > name="time">0.00.0 > name="org.apache.solr.handler.component.HighlightComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.DebugComponent"> > name="time">0.0 > name="time">16.0 > name="org.apache.solr.handler.component.QueryComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.FacetComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.MoreLikeThisComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.HighlightComponent"> > name="time">0.0 > name="org.apache.solr.handler.component.DebugComponent"> > name="time">16.0 > > > > And here're the relevant entries from solrconfig.xml: > > > > > explicit > id,title,author,score > on > > > > > > 1 > 10 > > > -- > View this message in context: > http://www.nabble.com/Solr%27s-MLT-query-call-doesn%27t-work-tp24391843p24391843.html > Sent from the Solr - User mailing list archive at Nabble.com. |
|
|
Re: Solr's MLT query call doesn't workYou definitely need "mlt=true" if you are not using /solr/mlt.
Bill On Wed, Jul 8, 2009 at 2:14 PM, Otis Gospodnetic <otis_gospodnetic@... > wrote: > > Sergey, > > What about > http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= > 5&mlt.interestingTerms=details&fl=title+author+score&qt=mlt<http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt=%0A5&mlt.interestingTerms=details&fl=title+author+score&qt=mlt> > > ? > > Otis > -- > Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch > > > > ----- Original Message ---- > > From: SergeyG <sgoldberg@...> > > To: solr-user@... > > Sent: Wednesday, July 8, 2009 9:44:20 AM > > Subject: Solr's MLT query call doesn't work > > > > > > Hi, > > > > Recently, while implementing the MoreLikeThis search, I've run into the > > situation when Solr's mlt query calls don't work. > > > > More specifically, the following query: > > > > > http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= > > 5&mlt.interestingTerms=details&fl=title+author+score > > > > brings back just the doc with id=10 and nothing else. While using the > > GetMethod approach (putting /mlt explicitely into the url), I got back > some > > results. > > > > I've been trying to solve this problem for more than a week with no luck. > If > > anybody has any hint, please help. > > > > Below, I put logs & outputs from 3 runs: a) Solr; b) GetMethod (/mlt); c) > > GetMethod (/select). > > > > Thanks a lot. > > > > Regards, > > Sergey Goldberg > > > > > > Here're the logs: > > > > a) Solr (http://localhost:8080/solr/select) > > 08.07.2009 15:50:33 org.apache.solr.core.SolrCore execute > > INFO: [] webapp=/solr path=/select > > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt= > > true&mlt.interestingTerms=details&mlt.maxqt=5&wt=javabin&version=2.2} > hits=1 > > status=0 QTime=172 > > > > INFO MLTSearchRequestProcessor:49 - SolrServer url: > > http://localhost:8080/solr > > INFO MLTSearchRequestProcessor:67 - solrQuery> > > q=id%3A10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= > > 5&mlt.interestingTerms=details&fl=title+author+score > > INFO MLTSearchRequestProcessor:73 - Number of docs found = 1 > > INFO MLTSearchRequestProcessor:77 - title = SG_Book; score = 2.098612 > > > > > > b) GetMethod (http://localhost:8080/solr/mlt) > > 08.07.2009 16:55:44 org.apache.solr.core.SolrCore execute > > INFO: [] webapp=/solr path=/mlt > > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt.max > > qt=5&mlt.interestingTerms=details} status=0 QTime=15 > > > > INFO MLT2SearchRequestProcessor:76 - > > > > 0 > > name="QTime">0 > > maxScore="2.098612">2.098612S.G. > > name="title">SG_Book > > umFound="4" start="0" maxScore="0.28923997"> > > name="score">0.28923997O. > > HenryS.G.Four Million, > > The0.08667877 > > name="author">Katherine MosbyThe Season > > of Lillian Dawes0.07947738 > > name="author">Jerome K. JeromeThree Men > > in a Boat > > name="score">0.047219563Charles > > OliverS.G.ABC's of > > Science > > name="content_mlt:ye">1.0 > > name="content_mlt:tobin">1.0 > > name="content_mlt:a">1.0 > > name="content_mlt:i">1.0 > > name="content_mlt:his">1.0 > > > > > > > > c) GetMethod (http://localhost:8080/solr/select) > > 08.07.2009 17:06:45 org.apache.solr.core.SolrCore execute > > INFO: [] webapp=/solr path=/select > > params={fl=title+author+score&mlt.fl=content_mlt&q=id:10&mlt. > > maxqt=5&mlt.interestingTerms=details} hits=1 status=0 QTime=16 > > > > INFO MLT2SearchRequestProcessor:80 - > > > > 0 > > name="QTime">16title author > > scorecontent_mltid:10 > > name="mlt.maxqt">5 > > name="mlt.interestingTerms">details > > numFound="1" start="0" maxScore="2.098612"> > > name="score">2.098612S.G. > > name="title">SG_Book > > name="rawquerystring">id:10id:10 > > name="parsedq > > uery">id:10id:10 > > name="explain"> > > 2.098612 = (MATCH) weight(id:10 in 3), product of: > > 0.99999994 = queryWeight(id:10), product of: > > 2.0986123 = idf(docFreq=1, numDocs=5) > > 0.47650534 = queryNorm > > 2.0986123 = (MATCH) fieldWeight(id:10 in 3), product of: > > 1.0 = tf(termFreq(id:10)=1) > > 2.0986123 = idf(docFreq=1, numDocs=5) > > 1.0 = fieldNorm(field=id, doc=3) > > OldLuceneQParser > > name="timing">16.0 > > name="time">0.0 > > name="org.apache.solr.handler.component.QueryComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.FacetComponent"> > > name="time">0.00.0 > > name="org.apache.solr.handler.component.HighlightComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.DebugComponent"> > > name="time">0.0 > > name="time">16.0 > > name="org.apache.solr.handler.component.QueryComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.FacetComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.MoreLikeThisComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.HighlightComponent"> > > name="time">0.0 > > name="org.apache.solr.handler.component.DebugComponent"> > > name="time">16.0 > > > > > > > > And here're the relevant entries from solrconfig.xml: > > > > > > > > > > explicit > > id,title,author,score > > on > > > > > > > > > > > > 1 > > 10 > > > > > > -- > > View this message in context: > > > http://www.nabble.com/Solr%27s-MLT-query-call-doesn%27t-work-tp24391843p24391843.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > |
|
|
Re: Solr's MLT query call doesn't workMany thanks to everybody who replied to my message.
1. "A couple of things, your mlt.fl value, must be part of fl. In this case, content_mlt is not included in fl. I think the fl parameter value need to be comma separated. try fl=title,author,content_mlt,score" Yao, Although I don't understand why mlt.fl must be part of fl (at least, I didn't see this mentioned anywhere), I included this field into fl. But this didn't change anything. As to the syntax, both "fl=title,author,content_mlt,score" and "fl=title author content_mlt score" produced the same output (what, again, was the exactly the same as the one with "fl=title author score"). 2. "You definitely need "mlt=true" if you are not using /solr/mlt." Bill, "mlt=true" was included in the query while making the Solr call from the very beginning. 3. What about http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt=%0A5&mlt.interestingTerms=details&fl=title+author+score&qt=mlt Otis, I tried that too and got this: INFO MLTSearchRequestProcessor:69 - solrQuery> q=id%3A10&mlt=true&mlt.fl=content_mlt&mlt.maxqt= 5&mlt.interestingTerms=details&fl=title+author+score&qt=mlt ERROR MLTSearchRequestProcessor:88 - Error executing query INFO MLTSearchRequestProcessor:69 - solrQuery> q=id%3A10&mlt=true&mlt.fl=content_mlt&mlt.maxqt=5&mlt.interestingTerms=details&fl=title+author+content_mlt+score&qt=mlt ERROR MLTSearchRequestProcessor:88 - Error executing query Well, I didn't expect this to be such a hurdle. And I'm sure that hundreds of people before me have already done something similar, haven't they? This really looks bizarre. Thank you all. (Otis, when I saw your name I got a feeling that it was just a matter of seconds till this stubborn calls would start doing their job. :) ) Sergey
|
|
|
Re: Solr's MLT query call doesn't workWhat about http://localhost:8080/solr/select?q=id:10&mlt=true&mlt.fl=content_mlt&mlt.maxqt=5&mlt.interestingTerms=details&fl=title+author+score&mlt.mindf=1
? Jun Ohtani
|
|
|
Re: Solr's MLT query call doesn't workDone. Unfortunately with the same result.
![]() Thanks, Jun. Isn't it really strange? Again, I'm not the first person using Solr. I wonder if the matter might be just local, due to some not so obvious reason manifesting itself only on my machine (what is, of course, very unlikely but still possible)?
|
| Free embeddable forum powered by Nabble | Forum Help |