Class FluentSearch

java.lang.Object
com.atlan.model.search.CompoundQuery
com.atlan.model.search.FluentSearch

public class FluentSearch extends CompoundQuery
Search abstraction mechanism, to simplify the most common searches against Atlan (removing the need to understand the guts of Elastic).
  • Constructor Details

  • Method Details

    • builder

      public static FluentSearch.FluentSearchBuilder<?,?> builder(AtlanClient client)
      Build a fluent search against the provided Atlan tenant.
      Parameters:
      client - connectivity to an Atlan tenant
      Returns:
      the start of a fluent search against the tenant
    • toRequest

      public IndexSearchRequest toRequest()
      Translate the Atlan fluent search into an Atlan search request.
      Returns:
      an Atlan search request that encapsulates the fluent search
    • count

      public long count() throws AtlanException
      Return the total number of assets that will match the supplied criteria, using the most minimal query possible (retrieves minimal data).
      Returns:
      the count of assets that will match the supplied criteria
      Throws:
      AtlanException - on any issues interacting with the Atlan APIs
    • stream

      public Stream<Asset> stream() throws AtlanException
      Run the fluent search to retrieve assets that match the supplied criteria.
      Returns:
      a stream of assets that match the specified criteria, lazily-fetched
      Throws:
      AtlanException - on any issues interacting with the Atlan APIs
    • stream

      public Stream<Asset> stream(boolean parallel) throws AtlanException
      Run the fluent search to retrieve assets that match the supplied criteria. Note: if the number of results exceeds the predefined threshold (100,000 assets) this will be automatically converted into a bulkStream().
      Parameters:
      parallel - if true, returns a parallel stream
      Returns:
      a stream of assets that match the specified criteria, lazily-fetched
      Throws:
      AtlanException - on any issues interacting with the Atlan APIs
    • parallelStream

      public Stream<Asset> parallelStream() throws AtlanException
      Run the fluent search to retrieve assets that match the supplied criteria, using a parallel stream (multiple pages are retrieved in parallel for improved throughput). Note: if the number of results exceeds the predefined threshold (100,000 assets) this will be automatically converted into a bulkStream().
      Returns:
      a stream of assets that match the specified criteria, lazily-fetched
      Throws:
      AtlanException - on any issues interacting with the Atlan APIs
    • bulkStream

      public Stream<Asset> bulkStream() throws AtlanException
      Run the fluent search to retrieve assets that match the supplied criteria, using a stream specifically meant for streaming large numbers of results (100,000's or more). Note: this will apply its own sorting algorithm, so any sort order you have specified may be ignored.
      Returns:
      a stream of assets that match the specified criteria, lazily-fetched
      Throws:
      AtlanException - on any issues interacting with the Atlan APIs
    • _dsl

      protected IndexSearchDSL.IndexSearchDSLBuilder<?,?> _dsl()
      Translate the Atlan fluent search into an Atlan search DSL builder.
      Returns:
      an Atlan search DSL builder that encapsulates the fluent search
    • _requestBuilder

      protected IndexSearchRequest.IndexSearchRequestBuilder<?,?> _requestBuilder()
      Translate the Atlan fluent search into an Atlan search request builder.
      Returns:
      an Atlan search request builder that encapsulates the fluent search
    • _internal

      public static FluentSearch.FluentSearchBuilder<?,?> _internal()