Class KeywordField

All Implemented Interfaces:
IKeywordSearchable, ISearchable
Direct Known Subclasses:
InternalKeywordField

public class KeywordField extends SearchableField implements IKeywordSearchable
Represents any field in Atlan that can be searched only by keyword (no text-analyzed fuzziness).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from interface com.atlan.model.fields.ISearchable

    EMBEDDED_SOURCE_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeywordField(String atlan, String keyword)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(AtlanEnum value)
    Returns a query that will match all assets whose provided field has a value that exactly equals the provided enumerated value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    eq(String value, boolean caseInsensitive)
    Returns a query that will match all assets whose provided field has a value that exactly equals the provided string value.
    Returns the name of the keyword field index for this attribute in Elastic.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    in(Collection<String> values)
    Returns a query that will match all assets whose provided field has a value that exactly equals at least one of the provided string values.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    in(List<String> values, int minMustMatch)
    Returns a query that will match all assets whose provided field has multiple values that exactly equal a specified number of the provided string values.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    regex(String regexp, Collection<ElasticRegexOperator> flags, boolean caseInsensitive)
    Returns a query that will match all assets whose provided field has a value that matches the regular expression provided.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    startsWith(String value, boolean caseInsensitive)
    Returns a query that will match all assets whose provided field has a value that starts with the provided value.
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    wildcard(String value, boolean caseInsensitive)
    Returns a query that will match all assets whose provided field has a value that matches the wildcard expression provided.

    Methods inherited from class com.atlan.model.fields.SearchableField

    bucketBy, bucketBy, count, distinct, distinct, getElasticFieldName, hasAnyValue, order

    Methods inherited from class com.atlan.model.fields.AtlanField

    getAtlanFieldName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.atlan.model.fields.IKeywordSearchable

    eq, regex, regex, startsWith, wildcard

    Methods inherited from interface com.atlan.model.fields.ISearchable

    bucketBy, bucketBy
  • Field Details

  • Constructor Details

    • KeywordField

      public KeywordField(String atlan, String keyword)
      Default constructor.
      Parameters:
      atlan - name of the attribute in the metastore
      keyword - name of the keyword field in the search index
  • Method Details

    • getKeywordFieldName

      public String getKeywordFieldName()
      Returns the name of the keyword field index for this attribute in Elastic.
      Specified by:
      getKeywordFieldName in interface IKeywordSearchable
      Returns:
      the field name for the keyword index on this attribute
    • startsWith

      public co.elastic.clients.elasticsearch._types.query_dsl.Query startsWith(String value, boolean caseInsensitive)
      Returns a query that will match all assets whose provided field has a value that starts with the provided value. Note that this can also be a case-insensitive match.
      Specified by:
      startsWith in interface IKeywordSearchable
      Parameters:
      value - the value (prefix) to check the field's value starts with
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field starts with the value provided
    • eq

      public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(AtlanEnum value)
      Returns a query that will match all assets whose provided field has a value that exactly equals the provided enumerated value.
      Specified by:
      eq in interface IKeywordSearchable
      Parameters:
      value - the value (enumerated) to check the field's value is exactly equal to
      Returns:
      a query that will only match assets whose value for the field is exactly equal to the enumerated value provided
    • eq

      public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(String value, boolean caseInsensitive)
      Returns a query that will match all assets whose provided field has a value that exactly equals the provided string value. Note that this can also be modified to ignore case when doing the exact match.
      Specified by:
      eq in interface IKeywordSearchable
      Parameters:
      value - the value (string) to check the field's value is exactly equal to
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field is exactly equal to the string value provided (optionally case-insensitive)
    • in

      public co.elastic.clients.elasticsearch._types.query_dsl.Query in(Collection<String> values)
      Returns a query that will match all assets whose provided field has a value that exactly equals at least one of the provided string values.
      Specified by:
      in in interface IKeywordSearchable
      Parameters:
      values - the values (strings) to check the field's value is exactly equal to
      Returns:
      a query that will only match assets whose value for the field is exactly equal to at least one of the string values provided
    • in

      public co.elastic.clients.elasticsearch._types.query_dsl.Query in(List<String> values, int minMustMatch)
      Returns a query that will match all assets whose provided field has multiple values that exactly equal a specified number of the provided string values.
      Specified by:
      in in interface IKeywordSearchable
      Parameters:
      values - the values (strings) to check the field's values are exactly equal to
      minMustMatch - minimum number of values from the provided list that must be contained in the field's values
      Returns:
      a query that will only match assets whose values for the field are exactly equal to a minimal number of the string values provided
    • wildcard

      public co.elastic.clients.elasticsearch._types.query_dsl.Query wildcard(String value, boolean caseInsensitive)
      Returns a query that will match all assets whose provided field has a value that matches the wildcard expression provided. This is similar to regex matching, but only allows * (match zero or more characters) and ? (match any single character) operators.
      Specified by:
      wildcard in interface IKeywordSearchable
      Parameters:
      value - the value (containing either * or ?) to match against the field's values
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field matches the wildcard expression provided
    • regex

      public co.elastic.clients.elasticsearch._types.query_dsl.Query regex(String regexp, Collection<ElasticRegexOperator> flags, boolean caseInsensitive)
      Returns a query that will match all assets whose provided field has a value that matches the regular expression provided.
      Specified by:
      regex in interface IKeywordSearchable
      Parameters:
      regexp - regular expression to match values against
      flags - optional set of operators to enable in the regular expression engine
      caseInsensitive - if true will match the value irrespective of case, otherwise will be a case-sensitive match
      Returns:
      a query that will only match assets whose value for the field matches the regular expression provided