mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 02:35:02 +00:00
Fix document exclusion in mlt query parser in Cloud mode for schemas that have non-'id' unique field
This commit is contained in:
parent
7daad8d7d1
commit
44d8ee9115
@ -259,6 +259,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…
x
Reference in New Issue
Block a user