LUCENE-5536: don't call rollup() from TaxonomyFacets associations

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1578952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2014-03-18 15:28:24 +00:00
parent 5f39190e62
commit 8f2e504279
3 changed files with 4 additions and 8 deletions

View File

@ -389,7 +389,8 @@ public class FacetsConfig {
for(AssociationFacetField field : ent.getValue()) {
// NOTE: we don't add parents for associations
checkTaxoWriter(taxoWriter);
int ordinal = taxoWriter.addCategory(new FacetLabel(field.dim, field.path));
FacetLabel label = new FacetLabel(field.dim, field.path);
int ordinal = taxoWriter.addCategory(label);
if (upto + 4 > bytes.length) {
bytes = ArrayUtil.grow(bytes, upto+4);
}
@ -405,9 +406,8 @@ public class FacetsConfig {
upto += field.assoc.length;
// Drill down:
FacetLabel cp = new FacetLabel(field.dim, field.path);
for (int i = 1; i <= cp.length; i++) {
doc.add(new StringField(indexFieldName, pathToString(cp.components, i), Field.Store.NO));
for (int i = 1; i <= label.length; i++) {
doc.add(new StringField(indexFieldName, pathToString(label.components, i), Field.Store.NO));
}
}
doc.add(new BinaryDocValuesField(indexFieldName, new BytesRef(bytes, 0, upto)));

View File

@ -82,7 +82,5 @@ public class TaxonomyFacetSumFloatAssociations extends FloatTaxonomyFacets {
}
}
}
rollup();
}
}

View File

@ -82,7 +82,5 @@ public class TaxonomyFacetSumIntAssociations extends IntTaxonomyFacets {
}
}
}
rollup();
}
}