Authored by foxxy

性能优化

@@ -63,7 +63,8 @@ public class BrandAggregation extends AbstractAggregation { @@ -63,7 +63,8 @@ public class BrandAggregation extends AbstractAggregation {
63 Iterator<? extends Bucket> itSizeAgg = aggregation.getBuckets().iterator(); 63 Iterator<? extends Bucket> itSizeAgg = aggregation.getBuckets().iterator();
64 while (itSizeAgg.hasNext()) { 64 while (itSizeAgg.hasNext()) {
65 Bucket ltSize = itSizeAgg.next(); 65 Bucket ltSize = itSizeAgg.next();
66 - for (String brandId : ltSize.getKeyAsString().split(",")) { 66 + String[] brandIdArray=ltSize.getKeyAsString().split(",");
  67 + for (String brandId : brandIdArray) {
67 brandIds.add(brandId); 68 brandIds.add(brandId);
68 } 69 }
69 } 70 }