Class SearchableField

java.lang.Object
com.atlan.model.fields.AtlanField
com.atlan.model.fields.SearchableField
All Implemented Interfaces:
ISearchable
Direct Known Subclasses:
BooleanField, CustomMetadataField, KeywordField, KeywordTextField, KeywordTextStemmedField, NumericField, NumericRankField, TextField

public class SearchableField extends AtlanField implements ISearchable
Base class for any field in Atlan that can be searched.
  • Field Summary

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

    EMBEDDED_SOURCE_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    SearchableField(String atlan, String elastic)
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    co.elastic.clients.elasticsearch._types.aggregations.Aggregation
    bucketBy(int size, boolean includeSourceValue)
    Return criteria to bucket results based on the provided field.
    co.elastic.clients.elasticsearch._types.aggregations.Aggregation
    bucketBy(int size, Map<String,co.elastic.clients.elasticsearch._types.aggregations.Aggregation> nested, List<co.elastic.clients.util.NamedValue<co.elastic.clients.elasticsearch._types.SortOrder>> order)
    Return criteria to bucket results based on the provided field.
    co.elastic.clients.elasticsearch._types.aggregations.Aggregation
    Return criteria to calculate the number of values in the field across all results.
    co.elastic.clients.elasticsearch._types.aggregations.Aggregation
    Returns criteria to calculate the approximate number of distinct values in the field across all results.
    co.elastic.clients.elasticsearch._types.aggregations.Aggregation
    distinct(int precision)
    Returns criteria to calculate the approximate number of distinct values in the field across all results.
    protected String
     
    co.elastic.clients.elasticsearch._types.query_dsl.Query
    Returns a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field.
    co.elastic.clients.elasticsearch._types.SortOptions
    order(co.elastic.clients.elasticsearch._types.SortOrder order)
    Return a condition to sort results by the field, in the order specified.

    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.ISearchable

    bucketBy, bucketBy
  • Constructor Details

    • SearchableField

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

    • hasAnyValue

      public co.elastic.clients.elasticsearch._types.query_dsl.Query hasAnyValue()
      Returns a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field.
      Specified by:
      hasAnyValue in interface ISearchable
      Returns:
      a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field
    • distinct

      public co.elastic.clients.elasticsearch._types.aggregations.Aggregation distinct()
      Returns criteria to calculate the approximate number of distinct values in the field across all results. Note that this de-duplicates values, but is an approximation.
      Specified by:
      distinct in interface ISearchable
      Returns:
      criteria to calculate the approximate number of distinct values in a field across the results
    • distinct

      public co.elastic.clients.elasticsearch._types.aggregations.Aggregation distinct(int precision)
      Returns criteria to calculate the approximate number of distinct values in the field across all results. Note that this de-duplicates values, but is an approximation.
      Specified by:
      distinct in interface ISearchable
      Parameters:
      precision - threshold for precision of the count
      Returns:
      criteria to calculate the approximate number of distinct values in a field across the results
    • count

      public co.elastic.clients.elasticsearch._types.aggregations.Aggregation count()
      Return criteria to calculate the number of values in the field across all results. Note that this does not de-duplicate.
      Specified by:
      count in interface ISearchable
      Returns:
      criteria to calculate the number of values in the provided field across the results
    • bucketBy

      public co.elastic.clients.elasticsearch._types.aggregations.Aggregation bucketBy(int size, boolean includeSourceValue)
      Return criteria to bucket results based on the provided field.
      Specified by:
      bucketBy in interface ISearchable
      Parameters:
      size - the number of buckets to include results across.
      includeSourceValue - if true, include the actual source value of this attribute for each bucket will be included in the result
      Returns:
      criteria to bucket results by the provided field, across a maximum number of buckets defined by the provided size
    • bucketBy

      public co.elastic.clients.elasticsearch._types.aggregations.Aggregation bucketBy(int size, Map<String,co.elastic.clients.elasticsearch._types.aggregations.Aggregation> nested, List<co.elastic.clients.util.NamedValue<co.elastic.clients.elasticsearch._types.SortOrder>> order)
      Return criteria to bucket results based on the provided field.
      Specified by:
      bucketBy in interface ISearchable
      Parameters:
      size - the number of buckets to include results across.
      nested - a map of nested aggregations, from arbitrary string key to aggregation
      order - (optional) named value from aggregation key (string) to sort order
      Returns:
      criteria to bucket results by the provided field, across a maximum number of buckets, with nested (sub)aggregations
    • order

      public co.elastic.clients.elasticsearch._types.SortOptions order(co.elastic.clients.elasticsearch._types.SortOrder order)
      Return a condition to sort results by the field, in the order specified.
      Specified by:
      order in interface ISearchable
      Parameters:
      order - the order in which to sort the results based on the values of the field
      Returns:
      sort condition for the provided field, in the order specified
    • getElasticFieldName

      protected String getElasticFieldName()