lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkn...@apache.org
Subject [03/50] [abbrv] lucene-solr git commit: SOLR-8341: fix parsing of domain:{excludeTags:mytag}
Date Mon, 08 Feb 2016 22:35:38 GMT
SOLR-8341: fix parsing of domain:{excludeTags:mytag}

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_5_4@1716527 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d4234ff3
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d4234ff3
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d4234ff3

Branch: refs/heads/branch_5_4
Commit: d4234ff310a9749fc8cd4b7c41e6e350c4bad6a3
Parents: 4099e25
Author: Yonik Seeley <yonik@apache.org>
Authored: Wed Nov 25 19:59:26 2015 +0000
Committer: Yonik Seeley <yonik@apache.org>
Committed: Wed Nov 25 19:59:26 2015 +0000

----------------------------------------------------------------------
 solr/CHANGES.txt                                          |  4 ++++
 .../java/org/apache/solr/search/facet/FacetRequest.java   |  2 +-
 .../test/org/apache/solr/search/facet/TestJsonFacets.java | 10 +++++-----
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d4234ff3/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d264367..22d3732 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -272,6 +272,10 @@ Bug Fixes
 * SOLR-7169: bin/solr status should return exit code 3, not 0 if Solr is not running 
   (Dominik Siebel via Timothy Potter)
 
+* SOLR-8341: Fix JSON Facet API excludeTags when specified in the
+  form of domain:{excludeTags:mytag} (yonik)
+
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d4234ff3/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java b/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
index add5548..d8d233b 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
@@ -295,7 +295,7 @@ abstract class FacetParser<FacetRequestT extends FacetRequest> {
 
       Map<String,Object> domainMap = (Map<String,Object>) m.get("domain");
       if (domainMap != null) {
-        excludeTags = getStringList(m, "excludeTags");
+        excludeTags = getStringList(domainMap, "excludeTags");
         if (excludeTags != null) {
           getDomain().excludeTags = excludeTags;
         }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d4234ff3/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
index f7bcbc1..d4c1c00 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
@@ -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"
 
             , "json.facet", "{processEmpty:true, " +
                 " 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'}} }  " +
-                ",f2:{${terms} type:terms, field:${cat_s}, 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'}} }  " +
+                ",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}, domain:{excludeTags:allfilt},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, " +
@@ -961,7 +961,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
     // 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"
             , "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'}}  }" +
                 "}"
         )


Mime
View raw message