mirror of https://github.com/apache/lucene.git
SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
This commit is contained in:
parent
638b145376
commit
ba039f7c8c
|
@ -256,6 +256,9 @@ Bug Fixes
|
|||
* SOLR-8145: Fix position of OOM killer script when starting Solr in the background (Jurian Broertjes via
|
||||
Timothy Potter)
|
||||
|
||||
* SOLR-8769: Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-"id"
|
||||
unique field (Erik Hatcher, Anshum Gupta)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
* SOLR-7876: Speed up queries and operations that use many terms when timeAllowed has not been
|
||||
|
|
|
@ -163,7 +163,7 @@ public class CloudMLTQParser extends QParser {
|
|||
BooleanQuery.Builder realMLTQuery = new BooleanQuery.Builder();
|
||||
realMLTQuery.setDisableCoord(true);
|
||||
realMLTQuery.add(boostedMLTQuery, BooleanClause.Occur.MUST);
|
||||
realMLTQuery.add(createIdQuery("id", id), BooleanClause.Occur.MUST_NOT);
|
||||
realMLTQuery.add(createIdQuery(req.getSchema().getUniqueKeyField().getName(), id), BooleanClause.Occur.MUST_NOT);
|
||||
|
||||
return realMLTQuery.build();
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue