mirror of https://github.com/apache/lucene.git
SOLR-3062: join was ignoring acceptDocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1239355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3309fe9b30
commit
fa11c89517
|
@ -303,6 +303,9 @@ Bug Fixes
|
|||
* SOLR-3037: When using binary format in solrj the codec screws up parameters
|
||||
(Sami Siren via yonik)
|
||||
|
||||
* SOLR-3062: A join in the main query was not respecting any filters pushed
|
||||
down to it via acceptDocs since LUCENE-1536. (Mike Hugo, yonik)
|
||||
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
|
|
@ -220,7 +220,8 @@ class JoinQuery extends Query {
|
|||
filter = resultSet.getTopFilter();
|
||||
}
|
||||
|
||||
DocIdSet readerSet = filter.getDocIdSet(context, null); // this set only includes live docs
|
||||
// Although this set only includes live docs, other filters can be pushed down to queries.
|
||||
DocIdSet readerSet = filter.getDocIdSet(context, acceptDocs);
|
||||
if (readerSet == null) readerSet=DocIdSet.EMPTY_DOCIDSET;
|
||||
return new JoinScorer(this, readerSet.iterator(), getBoost());
|
||||
}
|
||||
|
|
|
@ -128,6 +128,12 @@ public class TestJoin extends SolrTestCaseJ4 {
|
|||
"debugQuery","true"),
|
||||
davesDepartments);
|
||||
|
||||
// find people that develop stuff - but limit via filter query to a name of "john"
|
||||
// this tests filters being pushed down to queries (SOLR-3062)
|
||||
assertJQ(req("q","{!join from=dept_id_s to=dept_s}text:develop", "fl","id", "fq", "name:john")
|
||||
,"/response=={'numFound':1,'start':0,'docs':[{'id':'1'}]}"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue