mirror of https://github.com/apache/lucene.git
SOLR-8341: fix parsing of domain:{excludeTags:mytag}
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1716523 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c862370abe
commit
45aef9f26d
|
@ -425,6 +425,10 @@ Bug Fixes
|
||||||
* SOLR-7169: bin/solr status should return exit code 3, not 0 if Solr is not running
|
* SOLR-7169: bin/solr status should return exit code 3, not 0 if Solr is not running
|
||||||
(Dominik Siebel via Timothy Potter)
|
(Dominik Siebel via Timothy Potter)
|
||||||
|
|
||||||
|
* SOLR-8341: Fix JSON Facet API excludeTags when specified in the
|
||||||
|
form of domain:{excludeTags:mytag} (yonik)
|
||||||
|
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,7 @@ abstract class FacetParser<FacetRequestT extends FacetRequest> {
|
||||||
|
|
||||||
Map<String,Object> domainMap = (Map<String,Object>) m.get("domain");
|
Map<String,Object> domainMap = (Map<String,Object>) m.get("domain");
|
||||||
if (domainMap != null) {
|
if (domainMap != null) {
|
||||||
excludeTags = getStringList(m, "excludeTags");
|
excludeTags = getStringList(domainMap, "excludeTags");
|
||||||
if (excludeTags != null) {
|
if (excludeTags != null) {
|
||||||
getDomain().excludeTags = excludeTags;
|
getDomain().excludeTags = excludeTags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -940,14 +940,14 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
|
|
||||||
// terms facet with nested query facet (with excludeTags)
|
// terms facet with nested query facet (with excludeTags, using new format inside domain:{})
|
||||||
client.testJQ(params(p, "q", "*:*", "fq", "{!tag=doc6,allfilt}-id:6", "fq","{!tag=doc3,allfilt}-id:3"
|
client.testJQ(params(p, "q", "*:*", "fq", "{!tag=doc6,allfilt}-id:6", "fq","{!tag=doc3,allfilt}-id:3"
|
||||||
|
|
||||||
, "json.facet", "{processEmpty:true, " +
|
, "json.facet", "{processEmpty:true, " +
|
||||||
" f0:{${terms} type:terms, field:${cat_s}, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
" f0:{${terms} type:terms, field:${cat_s}, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
||||||
",f1:{${terms} type:terms, field:${cat_s}, excludeTags:doc3, missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
",f1:{${terms} type:terms, field:${cat_s}, domain:{excludeTags:doc3}, missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
||||||
",f2:{${terms} type:terms, field:${cat_s}, excludeTags:allfilt,missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
",f2:{${terms} type:terms, field:${cat_s}, domain:{excludeTags:allfilt},missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
||||||
",f3:{${terms} type:terms, field:${cat_s}, excludeTags:doc6, missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
",f3:{${terms} type:terms, field:${cat_s}, domain:{excludeTags:doc6}, missing:true, facet:{nj:{query:'${where_s}:NJ'}} } " +
|
||||||
"}"
|
"}"
|
||||||
)
|
)
|
||||||
, "facets=={ count:4, " +
|
, "facets=={ count:4, " +
|
||||||
|
@ -961,7 +961,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
||||||
// range facet with sub facets and stats, with "other:all" (with excludeTags)
|
// range facet with sub facets and stats, with "other:all" (with excludeTags)
|
||||||
client.testJQ(params(p, "q", "*:*", "fq", "{!tag=doc6,allfilt}-id:6", "fq","{!tag=doc3,allfilt}-id:3"
|
client.testJQ(params(p, "q", "*:*", "fq", "{!tag=doc6,allfilt}-id:6", "fq","{!tag=doc3,allfilt}-id:3"
|
||||||
, "json.facet", "{processEmpty:true " +
|
, "json.facet", "{processEmpty:true " +
|
||||||
", f1:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} , excludeTags:allfilt }" +
|
", f1:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} , domain:{excludeTags:allfilt} }" +
|
||||||
", f2:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} }" +
|
", f2:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ x:'sum(${num_i})', ny:{query:'${where_s}:NY'}} }" +
|
||||||
"}"
|
"}"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue