You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robert Brown <ro...@intelcompute.com> on 2016/01/31 19:31:05 UTC
MLT Component only returns ID and score
Hi,
I've had to switch to using the MLT component, rather than the handler,
since I'm running on Solrcloud (5.4) and if I hit a node without the
starting document, I get nothing back.
When I perform a MLT query, I only get back the ID and score for the
similar documents, yet my fl=*,score.
"moreLikeThis" : [
"tg-uk-6336277-5820875618687434337",
{
"maxScore" : 16.857872,
"numFound" : 49559,
"docs" : [
{
"score" : 16.857872,
"id" : "tg-uk-6336277-6676971947462687384"
},
{
"score" : 16.857872,
"id" : "tg-uk-6336277-1922478172471276129"
},
Here's my config...
<requestHandler name="/select" class="solr.SearchHandler">
<lst name="defaults">
<str name="defType">edismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.1</float>
<str name="fl">*,score</str>
<str name="qf">
name^5
brand^2
category^3
</str>
<str name="df">name</str>
<str name="mm">100%</str>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
<str name="mlt.qf">
name^5 description^2 brand^3 category^3
</str>
<str
name="mlt.fl">name,description,ean,upc,asin,brand,category</str>
</lst>
<arr name="components">
<str>query</str>
<str>facet</str>
<str>mlt</str>
</arr>
</requestHandler>
Re: MLT Component only returns ID and score
Posted by Robert Brown <ro...@intelcompute.com>.
Thanks for the info, does this replace the mlt component? ie, can I
remove that component from being loaded/used?
These are my parameters, the results look okay, just want to ensure I'm
using it right...
fq => [
'market:uk'
],
q => '{!mlt
qf=name,description,brand,category,ean,upc,asin}az-uk-b017u8thna',
rows => 10,
start => 0,
wt => 'json'
On 31/01/16 20:17, Upayavira wrote:
> Try the MLT query parser, which is a much newer way of doing this.
> Perhaps it will work better for you.
>
> Upayavira
>
> On Sun, Jan 31, 2016, at 06:31 PM, Robert Brown wrote:
>> Hi,
>>
>> I've had to switch to using the MLT component, rather than the handler,
>> since I'm running on Solrcloud (5.4) and if I hit a node without the
>> starting document, I get nothing back.
>>
>> When I perform a MLT query, I only get back the ID and score for the
>> similar documents, yet my fl=*,score.
>>
>> "moreLikeThis" : [
>> "tg-uk-6336277-5820875618687434337",
>> {
>> "maxScore" : 16.857872,
>> "numFound" : 49559,
>> "docs" : [
>> {
>> "score" : 16.857872,
>> "id" : "tg-uk-6336277-6676971947462687384"
>> },
>> {
>> "score" : 16.857872,
>> "id" : "tg-uk-6336277-1922478172471276129"
>> },
>>
>>
>>
>> Here's my config...
>>
>> <requestHandler name="/select" class="solr.SearchHandler">
>>
>> <lst name="defaults">
>>
>> <str name="defType">edismax</str>
>>
>> <str name="echoParams">explicit</str>
>>
>> <float name="tie">0.1</float>
>>
>> <str name="fl">*,score</str>
>>
>> <str name="qf">
>> name^5
>> brand^2
>> category^3
>> </str>
>>
>> <str name="df">name</str>
>>
>> <str name="mm">100%</str>
>>
>> <int name="ps">100</int>
>>
>> <str name="q.alt">*:*</str>
>>
>> <str name="mlt.qf">
>> name^5 description^2 brand^3 category^3
>> </str>
>>
>> <str
>> name="mlt.fl">name,description,ean,upc,asin,brand,category</str>
>>
>> </lst>
>>
>> <arr name="components">
>> <str>query</str>
>> <str>facet</str>
>> <str>mlt</str>
>> </arr>
>>
>> </requestHandler>
>>
>>
>>
>>
Re: MLT Component only returns ID and score
Posted by Upayavira <uv...@odoko.co.uk>.
Try the MLT query parser, which is a much newer way of doing this.
Perhaps it will work better for you.
Upayavira
On Sun, Jan 31, 2016, at 06:31 PM, Robert Brown wrote:
> Hi,
>
> I've had to switch to using the MLT component, rather than the handler,
> since I'm running on Solrcloud (5.4) and if I hit a node without the
> starting document, I get nothing back.
>
> When I perform a MLT query, I only get back the ID and score for the
> similar documents, yet my fl=*,score.
>
> "moreLikeThis" : [
> "tg-uk-6336277-5820875618687434337",
> {
> "maxScore" : 16.857872,
> "numFound" : 49559,
> "docs" : [
> {
> "score" : 16.857872,
> "id" : "tg-uk-6336277-6676971947462687384"
> },
> {
> "score" : 16.857872,
> "id" : "tg-uk-6336277-1922478172471276129"
> },
>
>
>
> Here's my config...
>
> <requestHandler name="/select" class="solr.SearchHandler">
>
> <lst name="defaults">
>
> <str name="defType">edismax</str>
>
> <str name="echoParams">explicit</str>
>
> <float name="tie">0.1</float>
>
> <str name="fl">*,score</str>
>
> <str name="qf">
> name^5
> brand^2
> category^3
> </str>
>
> <str name="df">name</str>
>
> <str name="mm">100%</str>
>
> <int name="ps">100</int>
>
> <str name="q.alt">*:*</str>
>
> <str name="mlt.qf">
> name^5 description^2 brand^3 category^3
> </str>
>
> <str
> name="mlt.fl">name,description,ean,upc,asin,brand,category</str>
>
> </lst>
>
> <arr name="components">
> <str>query</str>
> <str>facet</str>
> <str>mlt</str>
> </arr>
>
> </requestHandler>
>
>
>
>