SOLR-7781: change FacetField BytesRef shallow clone to deep clone

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1690541 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2015-07-12 22:34:53 +00:00
parent 566859fb52
commit 9152164afb
2 changed files with 6 additions and 1 deletions

View File

@ -230,6 +230,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
----------------------

View File

@ -516,6 +516,7 @@ abstract class FacetFieldProcessorFCBase extends FacetFieldProcessor {
}
/** 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 extends FacetFieldProcessor {
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);