Class KeywordTextField

All Implemented Interfaces:
IKeywordSearchable, ISearchable, ITextSearchable
Direct Known Subclasses:
InternalKeywordTextField

public class KeywordTextField extends SearchableField implements IKeywordSearchable, ITextSearchable
Represents any field in Atlan that can be searched by keyword or text-based search operations.
  • 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
    KeywordTextField(String atlan, String keyword, String text)
    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.
    Returns the name of the text 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
    match(String value)
    Returns a query that will textually match the provided value against the field.
    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

    • KeywordTextField

      public KeywordTextField(String atlan, String keyword, String text)
      Default constructor.
      Parameters:
      atlan - name of the attribute in the metastore
      keyword - name of the keyword field in the search index
      text - name of the text 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
    • getTextFieldName

      public String getTextFieldName()
      Returns the name of the text field index for this attribute in Elastic.
      Specified by:
      getTextFieldName in interface ITextSearchable
      Returns:
      the field name for the text 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
    • match

      public co.elastic.clients.elasticsearch._types.query_dsl.Query match(String value)
      Returns a query that will textually match the provided value against the field. This analyzes the provided value according to the same analysis carried out on the field (for example, tokenization, stemming, and so on).
      Specified by:
      match in interface ITextSearchable
      Parameters:
      value - the string value to match against
      Returns:
      a query that will only match assets whose analyzed value for the field matches the value provided (which will also be analyzed)