org.elasticsearch.search.aggregations.metrics.CardinalityAggregationBuilder Java Examples
The following examples show how to use
org.elasticsearch.search.aggregations.metrics.CardinalityAggregationBuilder.
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: ElasticsearchSearchQueryBase.java From vertexium with Apache License 2.0 | 5 votes |
protected List<AggregationBuilder> getElasticsearchCardinalityAggregations(CardinalityAggregation agg) { List<AggregationBuilder> cardinalityAggs = new ArrayList<>(); String fieldName = agg.getPropertyName(); if (Element.ID_PROPERTY_NAME.equals(fieldName) || Edge.LABEL_PROPERTY_NAME.equals(fieldName) || Edge.OUT_VERTEX_ID_PROPERTY_NAME.equals(fieldName) || Edge.IN_VERTEX_ID_PROPERTY_NAME.equals(fieldName) || ExtendedDataRow.TABLE_NAME.equals(fieldName) || ExtendedDataRow.ROW_ID.equals(fieldName) || ExtendedDataRow.ELEMENT_ID.equals(fieldName) || ExtendedDataRow.ELEMENT_TYPE.equals(fieldName)) { Map<String, Object> metadata = new HashMap<>(); metadata.put(AGGREGATION_METADATA_FIELD_NAME_KEY, fieldName); if (Element.ID_PROPERTY_NAME.equals(fieldName) || ExtendedDataRow.ELEMENT_ID.equals(fieldName)) { fieldName = ELEMENT_ID_FIELD_NAME; } else if (ExtendedDataRow.ELEMENT_TYPE.equals(fieldName)) { fieldName = ELEMENT_TYPE_FIELD_NAME; } String aggregationName = createAggregationName(agg.getAggregationName(), "0"); CardinalityAggregationBuilder cardinalityAgg = AggregationBuilders.cardinality(aggregationName); cardinalityAgg.setMetaData(metadata); cardinalityAgg.field(fieldName); cardinalityAggs.add(cardinalityAgg); } else { throw new VertexiumException("Cannot use cardinality aggregation on properties with visibility: " + fieldName); } return cardinalityAggs; }
Example #2
Source File: BsDuplicateHostCA.java From fess with Apache License 2.0 | 4 votes |
public void setUpdatedBy_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setUpdatedBy_Cardinality("updatedBy", opLambda); }
Example #3
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 4 votes |
public void setUpdatedTime_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setUpdatedTime_Cardinality("updatedTime", opLambda); }
Example #4
Source File: BsFailureUrlCA.java From fess with Apache License 2.0 | 4 votes |
public void setConfigId_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "configId"); if (opLambda != null) { opLambda.callback(builder); } }
Example #5
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setExcludedDocPaths_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "excludedDocPaths"); if (opLambda != null) { opLambda.callback(builder); } }
Example #6
Source File: BsRoleTypeCA.java From fess with Apache License 2.0 | 4 votes |
public void setName_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "name"); if (opLambda != null) { opLambda.callback(builder); } }
Example #7
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 4 votes |
public void setTarget_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setTarget_Cardinality("target", opLambda); }
Example #8
Source File: BsRequestHeaderCA.java From fess with Apache License 2.0 | 4 votes |
public void setWebConfigId_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "webConfigId"); if (opLambda != null) { opLambda.callback(builder); } }
Example #9
Source File: BsElevateWordCA.java From fess with Apache License 2.0 | 4 votes |
public void setUpdatedTime_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "updatedTime"); if (opLambda != null) { opLambda.callback(builder); } }
Example #10
Source File: BsRoleCA.java From fess with Apache License 2.0 | 4 votes |
public void setName_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "name"); if (opLambda != null) { opLambda.callback(builder); } }
Example #11
Source File: BsWebAuthenticationCA.java From fess with Apache License 2.0 | 4 votes |
public void setWebConfigId_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setWebConfigId_Cardinality("webConfigId", opLambda); }
Example #12
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 4 votes |
public void setScriptData_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "scriptData"); if (opLambda != null) { opLambda.callback(builder); } }
Example #13
Source File: BsSearchLogCA.java From fess with Apache License 2.0 | 4 votes |
public void setSearchWord_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "searchWord"); if (opLambda != null) { opLambda.callback(builder); } }
Example #14
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setAvailable_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "available"); if (opLambda != null) { opLambda.callback(builder); } }
Example #15
Source File: BsBadWordCA.java From fess with Apache License 2.0 | 4 votes |
public void setCreatedTime_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setCreatedTime_Cardinality("createdTime", opLambda); }
Example #16
Source File: BsKeyMatchCA.java From fess with Apache License 2.0 | 4 votes |
public void setMaxSize_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setMaxSize_Cardinality("maxSize", opLambda); }
Example #17
Source File: BsJobLogCA.java From fess with Apache License 2.0 | 4 votes |
public void setLastUpdated_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "lastUpdated"); if (opLambda != null) { opLambda.callback(builder); } }
Example #18
Source File: BsBoostDocumentRuleCA.java From fess with Apache License 2.0 | 4 votes |
public void setCreatedBy_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setCreatedBy_Cardinality("createdBy", opLambda); }
Example #19
Source File: BsRelatedContentCA.java From fess with Apache License 2.0 | 4 votes |
public void setCreatedTime_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setCreatedTime_Cardinality("createdTime", opLambda); }
Example #20
Source File: BsFileConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setVirtualHosts_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "virtualHosts"); if (opLambda != null) { opLambda.callback(builder); } }
Example #21
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setTimeToLive_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setTimeToLive_Cardinality("timeToLive", opLambda); }
Example #22
Source File: BsWebConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setPermissions_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "permissions"); if (opLambda != null) { opLambda.callback(builder); } }
Example #23
Source File: BsAccessTokenCA.java From fess with Apache License 2.0 | 4 votes |
public void setExpiredTime_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "expiredTime"); if (opLambda != null) { opLambda.callback(builder); } }
Example #24
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 4 votes |
public void setScriptData_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setScriptData_Cardinality("scriptData", opLambda); }
Example #25
Source File: BsSearchLogCA.java From fess with Apache License 2.0 | 4 votes |
public void setQueryPageSize_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "queryPageSize"); if (opLambda != null) { opLambda.callback(builder); } }
Example #26
Source File: BsFailureUrlCA.java From fess with Apache License 2.0 | 4 votes |
public void setThreadName_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "threadName"); if (opLambda != null) { opLambda.callback(builder); } }
Example #27
Source File: BsCrawlingInfoParamCA.java From fess with Apache License 2.0 | 4 votes |
public void setValue_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setValue_Cardinality("value", opLambda); }
Example #28
Source File: BsBadWordCA.java From fess with Apache License 2.0 | 4 votes |
public void setSuggestWord_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { setSuggestWord_Cardinality("suggestWord", opLambda); }
Example #29
Source File: BsScheduledJobCA.java From fess with Apache License 2.0 | 4 votes |
public void setName_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "name"); if (opLambda != null) { opLambda.callback(builder); } }
Example #30
Source File: BsDataConfigCA.java From fess with Apache License 2.0 | 4 votes |
public void setCreatedBy_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) { CardinalityAggregationBuilder builder = regCardinalityA(name, "createdBy"); if (opLambda != null) { opLambda.callback(builder); } }