mirror of https://github.com/apache/lucene.git
SOLR-8644: Test asserts that block join facets work with parent level fq exclusions
This commit is contained in:
parent
f0963b3b4f
commit
2c7d86bc4d
|
@ -289,6 +289,8 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-8643: BlockJoinFacetComponent is substituted by BlockJoinFacetDocSetComponent. It doesn't need to change solrconfig.xml (Mikhail Khludnev)
|
* SOLR-8643: BlockJoinFacetComponent is substituted by BlockJoinFacetDocSetComponent. It doesn't need to change solrconfig.xml (Mikhail Khludnev)
|
||||||
|
|
||||||
|
* SOLR-8644: Test asserts that block join facets work with parent level fq exclusions. (Dr. Oleg Savrasov via Mikhail Khludnev)
|
||||||
|
|
||||||
================== 6.1.0 ==================
|
================== 6.1.0 ==================
|
||||||
|
|
||||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
|
import org.apache.solr.request.SolrQueryRequest;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -94,4 +95,27 @@ public class BlockJoinFacetSimpleTest extends SolrTestCaseJ4 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testParentLevelFQExclusion() {
|
||||||
|
SolrQueryRequest req = req(
|
||||||
|
"qt", handler,
|
||||||
|
"q", "{!parent which=type_s:parent}+SIZE_s:XL",
|
||||||
|
"fq", "{!term f=BRAND_s tag=rbrand}Nike",
|
||||||
|
"facet", "true",
|
||||||
|
"facet.field", "BRAND_s",
|
||||||
|
"child.facet.field", "COLOR_s");
|
||||||
|
assertQ("no exclusion, brand facet got only one Nike",req, "//*[@numFound='" + 1 + "']",
|
||||||
|
"count(//lst[@name='BRAND_s']/int[.='1'])=1");
|
||||||
|
|
||||||
|
assertQ("nike filter is excluded, expecting both brand in facet",req(
|
||||||
|
"qt", handler,
|
||||||
|
"q", "{!parent which=type_s:parent}+SIZE_s:XL",
|
||||||
|
"fq", "{!term f=BRAND_s tag=rbrand}Nike",
|
||||||
|
"facet", "true",
|
||||||
|
"facet.field", "{!ex=rbrand}BRAND_s",
|
||||||
|
"child.facet.field", "COLOR_s"),
|
||||||
|
"//*[@numFound='" + 1 + "']",
|
||||||
|
"count(//lst[@name='BRAND_s']/int[.='1'])=2");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue