Class DocumentAttributeCondition

    • Method Detail

      • conditionDocumentAttributeKey

        public final String conditionDocumentAttributeKey()

        The identifier of the document attribute used for the condition.

        For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.

        Amazon Kendra currently does not support _document_body as an attribute key used for the condition.

        Returns:
        The identifier of the document attribute used for the condition.

        For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.

        Amazon Kendra currently does not support _document_body as an attribute key used for the condition.

      • operator

        public final ConditionOperator operator()

        The condition operator.

        For example, you can use 'Contains' to partially match a string.

        If the service returns an enum value that is not available in the current SDK version, operator will return ConditionOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from operatorAsString().

        Returns:
        The condition operator.

        For example, you can use 'Contains' to partially match a string.

        See Also:
        ConditionOperator
      • operatorAsString

        public final String operatorAsString()

        The condition operator.

        For example, you can use 'Contains' to partially match a string.

        If the service returns an enum value that is not available in the current SDK version, operator will return ConditionOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from operatorAsString().

        Returns:
        The condition operator.

        For example, you can use 'Contains' to partially match a string.

        See Also:
        ConditionOperator
      • conditionOnValue

        public final DocumentAttributeValue conditionOnValue()

        The value used by the operator.

        For example, you can specify the value 'financial' for strings in the 'Source_URI' field that partially match or contain this value.

        Returns:
        The value used by the operator.

        For example, you can specify the value 'financial' for strings in the 'Source_URI' field that partially match or contain this value.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)