org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder Java Examples
The following examples show how to use
org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BsRequestHeaderCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsRequestHeaderCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { RequestHeaderCA ca = new RequestHeaderCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #2
Source File: BsSearchLogCA.java From fess with Apache License 2.0 | 5 votes |
public void setQueryPageSize_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsSearchLogCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "queryPageSize"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { SearchLogCA ca = new SearchLogCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #3
Source File: BsRelatedContentCA.java From fess with Apache License 2.0 | 5 votes |
public void setUpdatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "updatedTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { RelatedContentCA ca = new RelatedContentCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #4
Source File: BsWebAuthenticationCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsWebAuthenticationCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { WebAuthenticationCA ca = new WebAuthenticationCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #5
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setAvailable_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsFileConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "available"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { FileConfigCA ca = new FileConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #6
Source File: BsBoostDocumentRuleCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsBoostDocumentRuleCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { BoostDocumentRuleCA ca = new BoostDocumentRuleCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #7
Source File: BsKeyMatchCA.java From fess with Apache License 2.0 | 5 votes |
public void setBoost_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsKeyMatchCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "boost"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { KeyMatchCA ca = new KeyMatchCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #8
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setDepth_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsFileConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "depth"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { FileConfigCA ca = new FileConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #9
Source File: BsRoleTypeCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsRoleTypeCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { RoleTypeCA ca = new RoleTypeCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #10
Source File: BsJobLogCA.java From fess with Apache License 2.0 | 5 votes |
public void setStartTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsJobLogCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "startTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { JobLogCA ca = new JobLogCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #11
Source File: BsElevateWordCA.java From fess with Apache License 2.0 | 5 votes |
public void setUpdatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "updatedTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { ElevateWordCA ca = new ElevateWordCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #12
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setDepth_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsWebConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "depth"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { WebConfigCA ca = new WebConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #13
Source File: BsSearchLogCA.java From fess with Apache License 2.0 | 5 votes |
public void setResponseTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsSearchLogCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "responseTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { SearchLogCA ca = new SearchLogCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #14
Source File: BsDataConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsDataConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { DataConfigCA ca = new DataConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #15
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsScheduledJobCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { ScheduledJobCA ca = new ScheduledJobCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #16
Source File: BsGroupCA.java From fess with Apache License 2.0 | 5 votes |
public void setGidNumber_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsGroupCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "gidNumber"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { GroupCA ca = new GroupCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #17
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsFileConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { FileConfigCA ca = new FileConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #18
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setMaxAccessCount_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsFileConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "maxAccessCount"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { FileConfigCA ca = new FileConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #19
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setIntervalTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsWebConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "intervalTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { WebConfigCA ca = new WebConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #20
Source File: BsAccessTokenCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsAccessTokenCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { AccessTokenCA ca = new AccessTokenCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #21
Source File: BsLabelTypeCA.java From fess with Apache License 2.0 | 5 votes |
public void setUpdatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsLabelTypeCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "updatedTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { LabelTypeCA ca = new LabelTypeCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #22
Source File: BsDuplicateHostCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsDuplicateHostCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { DuplicateHostCA ca = new DuplicateHostCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #23
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 5 votes |
public void setSortOrder_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsWebConfigCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "sortOrder"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { WebConfigCA ca = new WebConfigCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #24
Source File: BsFileAuthenticationCA.java From fess with Apache License 2.0 | 5 votes |
public void setPort_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsFileAuthenticationCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "port"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { FileAuthenticationCA ca = new FileAuthenticationCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #25
Source File: BsRelatedContentCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsRelatedContentCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { RelatedContentCA ca = new RelatedContentCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #26
Source File: BsBoostDocumentRuleCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsBoostDocumentRuleCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { BoostDocumentRuleCA ca = new BoostDocumentRuleCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #27
Source File: BsCrawlingInfoParamCA.java From fess with Apache License 2.0 | 5 votes |
public void setCreatedTime_Histogram(String name, ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsCrawlingInfoParamCA> aggsLambda) { HistogramAggregationBuilder builder = regHistogramA(name, "createdTime"); if (opLambda != null) { opLambda.callback(builder); } if (aggsLambda != null) { CrawlingInfoParamCA ca = new CrawlingInfoParamCA(); aggsLambda.callback(ca); ca.getAggregationBuilderList().forEach(builder::subAggregation); } }
Example #28
Source File: ElasticsearchSearchQueryBase.java From vertexium with Apache License 2.0 | 5 votes |
private Collection<? extends AggregationBuilder> getElasticsearchCalendarFieldAggregation(CalendarFieldAggregation agg) { List<AggregationBuilder> aggs = new ArrayList<>(); PropertyDefinition propertyDefinition = getPropertyDefinition(agg.getPropertyName()); if (propertyDefinition == null) { throw new VertexiumException("Could not find mapping for property: " + agg.getPropertyName()); } Class propertyDataType = propertyDefinition.getDataType(); for (String propertyName : getPropertyNames(agg.getPropertyName())) { String visibilityHash = getSearchIndex().getPropertyVisibilityHashFromPropertyName(propertyName); String aggName = createAggregationName(agg.getAggregationName(), visibilityHash); if (propertyDataType == Date.class) { HistogramAggregationBuilder histAgg = AggregationBuilders.histogram(aggName); histAgg.interval(1); if (agg.getMinDocumentCount() != null) { histAgg.minDocCount(agg.getMinDocumentCount()); } else { histAgg.minDocCount(1L); } Script script = new Script( ScriptType.INLINE, "painless", getCalendarFieldAggregationScript(agg, propertyName), ImmutableMap.of( "tzId", agg.getTimeZone().getID(), "fieldName", propertyName, "calendarField", agg.getCalendarField()) ); histAgg.script(script); for (AggregationBuilder subAgg : getElasticsearchAggregations(agg.getNestedAggregations())) { histAgg.subAggregation(subAgg); } aggs.add(histAgg); } else { throw new VertexiumException("Only dates are supported for hour of day aggregations"); } } return aggs; }
Example #29
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setNumOfThread_Histogram(ConditionOptionCall<HistogramAggregationBuilder> opLambda) { setNumOfThread_Histogram("numOfThread", opLambda, null); }
Example #30
Source File: BsDataConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setCreatedTime_Histogram(ConditionOptionCall<HistogramAggregationBuilder> opLambda, OperatorCall<BsDataConfigCA> aggsLambda) { setCreatedTime_Histogram("createdTime", opLambda, aggsLambda); }