Class SearchLogResponse

All Implemented Interfaces:
AtlanResponseInterface, Serializable, Iterable<SearchLogEntry>

public class SearchLogResponse extends ApiResource implements Iterable<SearchLogEntry>
Captures the response from a search against Atlan's search log. Also provides the ability to iteratively page through results, without needing to track or re-run the original query using getNextPage().
See Also:
  • Constructor Details

    • SearchLogResponse

      public SearchLogResponse()
  • Method Details

    • getNextPage

      public SearchLogResponse getNextPage() throws AtlanException
      Retrieve the next page of results from this response.
      Returns:
      next page of results from this response
      Throws:
      AtlanException - on any API interaction problem
    • getSpecificPage

      public List<SearchLogEntry> getSpecificPage(int offset, int pageSize) throws AtlanException
      Retrieve a specific page of results using the same query used to produce this response.
      Parameters:
      offset - starting point for the specific page
      pageSize - maximum number of results beyond the starting point to retrieve
      Returns:
      specific page of results from this response
      Throws:
      AtlanException - on any API interaction problem
    • getNextBulkPage

      protected SearchLogResponse getNextBulkPage() throws AtlanException
      Retrieve the next page of results from this response, using bulk-oriented paging.
      Returns:
      next page of results from this response
      Throws:
      AtlanException - on any API interaction problem
    • iterator

      public Iterator<SearchLogEntry> iterator()
      Specified by:
      iterator in interface Iterable<SearchLogEntry>
    • biterator

      public Iterator<SearchLogEntry> biterator()
      Returns an iterator over the elements of the index search, lazily paged, but in such a way that they can be iterated through in bulk (10,000's of results or more). Note: this will reorder the results and will NOT retain the sort ordering you have specified (if any). (Uses offset-limited sequential paging, to avoid large offsets that effectively need to re-retrieve many large numbers of previous pages' results.)
      Returns:
      iterator through the search log entries in the search results
    • spliterator

      public Spliterator<SearchLogEntry> spliterator()
      Specified by:
      spliterator in interface Iterable<SearchLogEntry>
    • stream

      public Stream<SearchLogEntry> stream()
      Stream the results (lazily) for processing without needing to manually manage paging.
      Returns:
      a lazily-loaded stream of results from the search
    • parallelStream

      public Stream<SearchLogEntry> parallelStream()
      Stream the results in parallel across all pages (may do more than limited to in a request).
      Returns:
      a lazily-loaded stream of results from the search
    • bulkStream

      public Stream<SearchLogEntry> bulkStream()
      Stream a large number of results (lazily) for processing without needing to manually manage paging. Note: this will reorder the results in order to iterate through a large number (more than 10,000) results, so any sort ordering you have specified may be ignored.
      Returns:
      a lazily-loaded stream of results from the search
    • presortedByTimestamp

      public static boolean presortedByTimestamp(List<co.elastic.clients.elasticsearch._types.SortOptions> sort)
      Indicates whether the sort options prioritize creation-time in ascending order as the first sorting key (true) or anything else (false).
      Parameters:
      sort - list of sorting options
      Returns:
      true if the sorting options have creation time, ascending as the first option
    • hasUserRequestedSort

      public static boolean hasUserRequestedSort(List<co.elastic.clients.elasticsearch._types.SortOptions> sort)
      Indicates whether the sort options contain any user-requested sorting (true) or not (false).
      Parameters:
      sort - list of sorting options
      Returns:
      true if the sorting options have any user-requested sorting
    • sortByTimestampFirst

      public static List<co.elastic.clients.elasticsearch._types.SortOptions> sortByTimestampFirst(List<co.elastic.clients.elasticsearch._types.SortOptions> sort)
      Rewrites the sorting options to ensure that sorting by creation time, ascending, is the top priority. Adds this condition if it does not already exist, or moves it up to the top sorting priority if it does already exist in the list.
      Parameters:
      sort - list of sorting options
      Returns:
      rewritten sorting options, making sorting by creation time in ascending order the top priority
    • getClient

      public AtlanClient getClient()
      Connectivity to the Atlan tenant where the search was run.
    • getSearchParameters

      public SearchLogRequest getSearchParameters()
      Parameters for the search.
    • getLogEntries

      public List<SearchLogEntry> getLogEntries()
      List of results from the search.
    • getApproximateCount

      public Long getApproximateCount()
      Approximate number of total results.
    • getAggregations

      public Map<String,AggregationResult> getAggregations()
      Map of results for the requested aggregations.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AtlanObject
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AtlanObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AtlanObject
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class ApiResource
    • setClient

      public void setClient(AtlanClient client)
      Connectivity to the Atlan tenant where the search was run.