You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2015/07/13 00:36:55 UTC

svn commit: r1690542 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/CHANGES.txt solr/core/ solr/core/src/java/org/apache/solr/search/facet/FacetField.java

Author: yonik
Date: Sun Jul 12 22:36:55 2015
New Revision: 1690542

URL: http://svn.apache.org/r1690542
Log:
SOLR-7781: change FacetField BytesRef shallow clone to deep clone

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/facet/FacetField.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1690542&r1=1690541&r2=1690542&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Sun Jul 12 22:36:55 2015
@@ -170,6 +170,10 @@ Bug Fixes
 * SOLR-7529: CoreAdminHandler Reload throws NPE on null core name instead of a bad
   request error. (Jellyfrog, Edward Ribeiro via shalin)
 
+* SOLR-7781: JSON Facet API: Terms facet on string/text fields with sub-facets caused 
+  a bug that resulted in filter cache lookup misses as well as the filter cache 
+  exceeding it's configured size. (yonik)
+
 Optimizations
 ----------------------
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/facet/FacetField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/facet/FacetField.java?rev=1690542&r1=1690541&r2=1690542&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/facet/FacetField.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/search/facet/FacetField.java Sun Jul 12 22:36:55 2015
@@ -516,6 +516,7 @@ abstract class FacetFieldProcessorFCBase
   }
 
 
+  /** this BytesRef may be shared across calls and should be deep-cloned if necessary */
   abstract protected BytesRef lookupOrd(int ord) throws IOException;
   abstract protected void findStartAndEndOrds() throws IOException;
   abstract protected void collectDocs() throws IOException;
@@ -663,7 +664,7 @@ abstract class FacetFieldProcessorFCBase
 
       bucket.add("val", val);
 
-      TermQuery filter = needFilter ? new TermQuery(new Term(sf.getName(), br.clone())) : null;
+      TermQuery filter = needFilter ? new TermQuery(new Term(sf.getName(), BytesRef.deepCopyOf(br))) : null;
       fillBucket(bucket, countAcc.getCount(slotNum), slotNum, null, filter);
 
       bucketList.add(bucket);