lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1716523 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/search/facet/FacetRequest.java core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
Date Wed, 25 Nov 2015 19:51:09 GMT
Author: yonik
Date: Wed Nov 25 19:51:08 2015
New Revision: 1716523

URL: http://svn.apache.org/viewvc?rev=1716523&view=rev
Log:
SOLR-8341: fix parsing of domain:{excludeTags:mytag}

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1716523&r1=1716522&r2=1716523&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Nov 25 19:51:08 2015
@@ -425,6 +425,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
 ----------------------
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java?rev=1716523&r1=1716522&r2=1716523&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/facet/FacetRequest.java Wed
Nov 25 19:51:08 2015
@@ -295,7 +295,7 @@ abstract class FacetParser<FacetRequestT
 
       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;
         }

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java?rev=1716523&r1=1716522&r2=1716523&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java Wed
Nov 25 19:51:08 2015
@@ -940,14 +940,14 @@ public class TestJsonFacets extends Solr
             "}"
     );
 
-    // 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 Solr
     // 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