Skip to content

Commit

Permalink
Data tiers don't support aggregating and this failed listing supporte…
Browse files Browse the repository at this point in the history
…d aggregations
  • Loading branch information
martijnvg committed Feb 18, 2023
1 parent 24c5130 commit 8bf158e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ public ConstantFieldType(String name, Map<String, String> meta) {
assert isSearchable();
}

@Override
public final boolean isAggregatable() {
return true;
}

/**
* Return whether the constant value of this field matches the provided {@code pattern}
* as documented in {@link Regex#simpleMatch}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public String familyTypeName() {
return KeywordFieldMapper.CONTENT_TYPE;
}

@Override
public boolean isAggregatable() {
// Doesn't support field data (yet) and therefor attempting to aggregate on field of this field type fail
return false;
}

@Override
protected boolean matches(String pattern, boolean caseInsensitive, SearchExecutionContext context) {
if (caseInsensitive) {
Expand Down

0 comments on commit 8bf158e

Please sign in to comment.