[ 
https://issues.apache.org/jira/browse/SOLR-8769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966182#comment-15966182
 ] 

Peter Ciuffetti commented on SOLR-8769:
---------------------------------------

It would appear the original fetch is also hardwired to 'id' and does not use 
the name established by uniqueKey:

https://github.com/apache/lucene-solr/blob/813ca77250db29116812bc949e2a466a70f969a3/solr/core/src/java/org/apache/solr/search/mlt/CloudMLTQParser.java#L180

> CloudMLTQParser does not use uniqueKey field name for exclusion
> ---------------------------------------------------------------
>
>                 Key: SOLR-8769
>                 URL: https://issues.apache.org/jira/browse/SOLR-8769
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Erik Hatcher
>             Fix For: 5.5.1, 6.0
>
>
> Using the {{\{!mlt}}} query parser in cloud mode on a schema with a non-"id" 
> uniqueKey, the main "like this" document won't be excluded properly due to 
> this code:
> {code}
> realMLTQuery.add(createIdQuery("id", id), BooleanClause.Occur.MUST_NOT);
> {code}
> See also 
> https://github.com/apache/lucene-solr/blob/813ca77250db29116812bc949e2a466a70f969a3/solr/core/src/java/org/apache/solr/search/mlt/CloudMLTQParser.java#L166
> Like SimpleMLTQParser, it needs to use the uniqueKey field with this type of 
> code: {{req.getSchema().getUniqueKeyField().getName()}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to