[
https://issues.apache.org/jira/browse/SOLR-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497312
]
Brian Whitman commented on SOLR-69:
-----------------------------------
Also (sorry to keep commenting on this!) asking for fl=score doesn't work, I
get this:
java.lang.NullPointerException
at org.apache.solr.search.DocSlice$1.score(DocSlice.java:117)
at org.apache.solr.request.XMLWriter.writeDocList(XMLWriter.java:369)
at org.apache.solr.request.XMLWriter.writeVal(XMLWriter.java:408)
at org.apache.solr.request.XMLWriter.writeResponse(XMLWriter.java:126)
at
org.apache.solr.request.XMLResponseWriter.write(XMLResponseWriter.java:35)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:169)
at
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:619)
if I do a query like
/mlt?q=id:100&mlt.fl=content&fl=content,score
If I take out the score from the fl it doesn't NPE.
> PATCH:MoreLikeThis support
> --------------------------
>
> Key: SOLR-69
> URL: https://issues.apache.org/jira/browse/SOLR-69
> Project: Solr
> Issue Type: Improvement
> Components: search
> Reporter: Bertrand Delacretaz
> Priority: Minor
> Attachments: lucene-queries-2.0.0.jar, lucene-queries-2.1.1-dev.jar,
> SOLR-69-MoreLikeThisRequestHandler.patch,
> SOLR-69-MoreLikeThisRequestHandler.patch, SOLR-69.patch, SOLR-69.patch,
> SOLR-69.patch, SOLR-69.patch
>
>
> Here's a patch that implements simple support of Lucene's MoreLikeThis class.
> The MoreLikeThisHelper code is heavily based on (hmm..."lifted from" might be
> more appropriate ;-) Erik Hatcher's example mentioned in
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00878.html
> To use it, add at least the following parameters to a standard or dismax
> query:
> mlt=true
> mlt.fl=list,of,fields,which,define,similarity
> See the MoreLikeThisHelper source code for more parameters.
> Here are two URLs that work with the example config, after loading all
> documents found in exampledocs in the index (just to show that it seems to
> work - of course you need a larger corpus to make it interesting):
> http://localhost:8983/solr/select/?stylesheet=&q=apache&qt=standard&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mindf=1&fl=id,score
> http://localhost:8983/solr/select/?stylesheet=&q=apache&qt=dismax&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mindf=1&fl=id,score
> Results are added to the output like this:
> <response>
> ...
> <lst name="moreLikeThis">
> <result name="UTF8TEST" numFound="1" start="0" maxScore="1.5293242">
> <doc>
> <float name="score">1.5293242</float>
> <str name="id">SOLR1000</str>
> </doc>
> </result>
> <result name="SOLR1000" numFound="1" start="0" maxScore="1.5293242">
> <doc>
> <float name="score">1.5293242</float>
> <str name="id">UTF8TEST</str>
> </doc>
> </result>
> </lst>
> I haven't tested this extensively yet, will do in the next few days. But
> comments are welcome of course.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.