Module org.elasticsearch.security
Class FieldNameTranslators
java.lang.Object
org.elasticsearch.xpack.security.support.FieldNameTranslators
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FieldNameTranslatorsstatic final Stringstatic final FieldNameTranslatorsstatic final FieldNameTranslators -
Method Summary
Modifier and TypeMethodDescriptionbooleanisIndexFieldSupported(String fieldName) booleanisQueryFieldSupported(String fieldName) Translate the query level field name to index level field names.voidtranslateFieldSortBuilders(List<FieldSortBuilder> fieldSortBuilders, SearchSourceBuilder searchSourceBuilder, Consumer<String> visitor) Adds the to the , translating the field names, form query level to index level, seetranslate(java.lang.String).translatePattern(String fieldNameOrPattern) Translates a query level field name pattern to the matching index level field names.translateQueryBuilderFields(QueryBuilder queryBuilder, Consumer<String> visitor) Deep copies the passed-in translating all the field names, from query level to index level, seetranslate(java.lang.String).
-
Field Details
-
FLATTENED_METADATA_INDEX_FIELD_NAME
- See Also:
-
API_KEY_FIELD_NAME_TRANSLATORS
-
USER_FIELD_NAME_TRANSLATORS
-
ROLE_FIELD_NAME_TRANSLATORS
-
-
Method Details
-
translateQueryBuilderFields
public QueryBuilder translateQueryBuilderFields(QueryBuilder queryBuilder, @Nullable Consumer<String> visitor) Deep copies the passed-in translating all the field names, from query level to index level, seetranslate(java.lang.String). In general, the returned builder should create the same query as if the query were created by the passed in , only with the field names translated. Field name patterns (including "*"), are also replaced with the explicit index level field names whose associated query level field names match the pattern. The optional can be used to collect all the translated field names. -
translateFieldSortBuilders
public void translateFieldSortBuilders(List<FieldSortBuilder> fieldSortBuilders, SearchSourceBuilder searchSourceBuilder, @Nullable Consumer<String> visitor) Adds the to the , translating the field names, form query level to index level, seetranslate(java.lang.String). The optional can be used to collect all the translated field names. -
translate
Translate the query level field name to index level field names. It throws an exception if the field name is not explicitly allowed. -
translatePattern
Translates a query level field name pattern to the matching index level field names. The result can be the empty set, if the pattern doesn't match any of the allowed index level field names. -
isQueryFieldSupported
-
isIndexFieldSupported
-