Package com.atlan.model.search
Class SearchLog
java.lang.Object
com.atlan.model.search.CompoundQuery
com.atlan.model.search.SearchLog
Search abstraction mechanism, to simplify the most common searches against Atlan's
log of past searches (removing the need to understand the guts of Elastic).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
SearchLog.SearchLogBuilder<C extends SearchLog,
B extends SearchLog.SearchLogBuilder<C, B>> Nested classes/interfaces inherited from class com.atlan.model.search.CompoundQuery
CompoundQuery.CompoundQueryBuilder<C extends CompoundQuery,
B extends CompoundQuery.CompoundQueryBuilder<C, B>> -
Field Summary
Modifier and TypeFieldDescriptionstatic final co.elastic.clients.elasticsearch._types.query_dsl.Query
static final co.elastic.clients.elasticsearch._types.query_dsl.Query
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected IndexSearchDSL.IndexSearchDSLBuilder<?,
?> _dsl()
Translate the Atlan search log search into an Atlan search DSL builder.static SearchLog.SearchLogBuilder<?,
?> protected SearchLogRequest.SearchLogRequestBuilder<?,
?> Translate the Atlan search log search into an Atlan search log request builder.static SearchLog.SearchLogBuilder<?,
?> builder
(AtlanClient client) Build a search log request against the provided Atlan tenant.Run the search to retrieve search log entries that match the supplied criteria, using a stream specifically meant for streaming large numbers of results (10,000 or more).long
count()
Return the total number of search log entries that will match the supplied criteria, using the most minimal query possible (retrieves minimal data).mostRecentViewers
(AtlanClient client, String guid, int maxUsers) Find the most recent viewers of the asset in Atlan.mostRecentViewers
(AtlanClient client, String guid, int maxUsers, List<String> excludeUsers) Find the most recent viewers of the asset in Atlan.static List<AssetViews>
mostViewedAssets
(AtlanClient client, int maxAssets, boolean byDifferentUsers) Find the most-viewed assets in Atlan.static List<AssetViews>
mostViewedAssets
(AtlanClient client, int maxAssets, boolean byDifferentUsers, List<String> excludeUsers) Find the most-viewed assets in Atlan.Run the search to retrieve search log entries that match the supplied criteria, using a parallel stream (multiple pages are retrieved in parallel for improved throughput).static SearchLog.SearchLogBuilder<?,
?> searches
(AtlanClient client) Start building a search log request for searches run against assets.static SearchLog.SearchLogBuilder<?,
?> searches
(AtlanClient client, long from, long to) Start building a search log request for searches run against assets.static SearchLog.SearchLogBuilder<?,
?> searches
(AtlanClient client, long from, long to, List<String> excludeUsers) Start building a search log request for searches run against assets.static SearchLog.SearchLogBuilder<?,
?> searches
(AtlanClient client, List<String> excludeUsers) Start building a search log request for searches run against assets.stream()
Run the search to retrieve search log entries that match the supplied criteria.stream
(boolean parallel) Run the search to retrieve search log entries that match the supplied criteria.Translate the Atlan search log into an Atlan search log request.static SearchLog.SearchLogBuilder<?,
?> views
(AtlanClient client) Start building a search log request for the views of assets.static SearchLog.SearchLogBuilder<?,
?> views
(AtlanClient client, long from, long to) Start building a search log request for the views of assets.static SearchLog.SearchLogBuilder<?,
?> views
(AtlanClient client, long from, long to, List<String> excludeUsers) Start building a search log request for the views of assets.static SearchLog.SearchLogBuilder<?,
?> views
(AtlanClient client, List<String> excludeUsers) Start building a search log request for the views of assets.static SearchLog.SearchLogBuilder<?,
?> viewsByGuid
(AtlanClient client, String guid) Start building a search log request for the views of an asset, by its GUID.static SearchLog.SearchLogBuilder<?,
?> viewsByGuid
(AtlanClient client, String guid, List<String> excludeUsers) Start building a search log request for the views of an asset, by its GUID.Methods inherited from class com.atlan.model.search.CompoundQuery
toQuery, toUnfilteredQuery
-
Field Details
-
EXCLUDE_USERS
-
VIEWED
public static final co.elastic.clients.elasticsearch._types.query_dsl.Query VIEWED -
SEARCHED
public static final co.elastic.clients.elasticsearch._types.query_dsl.Query SEARCHED
-
-
Constructor Details
-
SearchLog
-
-
Method Details
-
builder
Build a search log request against the provided Atlan tenant.- Parameters:
client
- connectivity to an Atlan tenant- Returns:
- the start of a search log request against the tenant
-
views
Start building a search log request for the views of assets.- Parameters:
client
- connectivity to the Atlan tenant- Returns:
- a request builder pre-configured with these criteria
-
views
Start building a search log request for the views of assets.- Parameters:
client
- connectivity to the Atlan tenantexcludeUsers
- list of usernames to exclude from the results- Returns:
- a request builder pre-configured with these criteria
-
views
Start building a search log request for the views of assets.- Parameters:
client
- connectivity to the Atlan tenantfrom
- timestamp after which to look for any asset view activity (inclusive)to
- timestamp up through which to look for any asset view activity (inclusive)- Returns:
- a request builder pre-configured with these criteria
-
views
public static SearchLog.SearchLogBuilder<?,?> views(AtlanClient client, long from, long to, List<String> excludeUsers) Start building a search log request for the views of assets.- Parameters:
client
- connectivity to the Atlan tenantfrom
- timestamp after which to look for any asset view activity (inclusive)to
- timestamp up through which to look for any asset view activity (inclusive)excludeUsers
- list of usernames to exclude from the results- Returns:
- a request builder pre-configured with these criteria
-
searches
Start building a search log request for searches run against assets.- Parameters:
client
- connectivity to the Atlan tenant- Returns:
- a request builder pre-configured with these criteria
-
searches
public static SearchLog.SearchLogBuilder<?,?> searches(AtlanClient client, List<String> excludeUsers) Start building a search log request for searches run against assets.- Parameters:
client
- connectivity to the Atlan tenantexcludeUsers
- list of usernames to exclude from the results- Returns:
- a request builder pre-configured with these criteria
-
searches
Start building a search log request for searches run against assets.- Parameters:
client
- connectivity to the Atlan tenantfrom
- timestamp after which to look for any search activity (inclusive)to
- timestamp up through which to look for any search activity (inclusive)- Returns:
- a request builder pre-configured with these criteria
-
searches
public static SearchLog.SearchLogBuilder<?,?> searches(AtlanClient client, long from, long to, List<String> excludeUsers) Start building a search log request for searches run against assets.- Parameters:
client
- connectivity to the Atlan tenantfrom
- timestamp after which to look for any search activity (inclusive)to
- timestamp up through which to look for any search activity (inclusive)excludeUsers
- list of usernames to exclude from the results- Returns:
- a request builder pre-configured with these criteria
-
viewsByGuid
Start building a search log request for the views of an asset, by its GUID.- Parameters:
client
- connectivity to the Atlan tenantguid
- unique identifier of the asset for which to retrieve the view history- Returns:
- a request builder pre-configured with these criteria
-
viewsByGuid
public static SearchLog.SearchLogBuilder<?,?> viewsByGuid(AtlanClient client, String guid, List<String> excludeUsers) Start building a search log request for the views of an asset, by its GUID.- Parameters:
client
- connectivity to the Atlan tenantguid
- unique identifier of the asset for which to retrieve the view historyexcludeUsers
- list of usernames to exclude from the results- Returns:
- a request builder pre-configured with these criteria
-
mostRecentViewers
public static List<UserViews> mostRecentViewers(AtlanClient client, String guid, int maxUsers) throws AtlanException Find the most recent viewers of the asset in Atlan.- Parameters:
client
- connectivity to the Atlan tenant on which to run the searchguid
- of the assetmaxUsers
- maximum number of recent users to consider- Returns:
- the list of users that most-recently viewed the asset, in descending order (most-recently viewed first)
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
mostRecentViewers
public static List<UserViews> mostRecentViewers(AtlanClient client, String guid, int maxUsers, List<String> excludeUsers) throws AtlanException Find the most recent viewers of the asset in Atlan.- Parameters:
client
- connectivity to the Atlan tenant on which to run the searchguid
- of the assetmaxUsers
- maximum number of recent users to considerexcludeUsers
- list of usernames to exclude from the results- Returns:
- the list of users that most-recently viewed the asset, in descending order (most-recently viewed first)
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
mostViewedAssets
public static List<AssetViews> mostViewedAssets(AtlanClient client, int maxAssets, boolean byDifferentUsers) throws AtlanException Find the most-viewed assets in Atlan.- Parameters:
client
- connectivity to the Atlan tenant on which to run the searchmaxAssets
- maximum number of assets to considerbyDifferentUsers
- when true, will consider assets viewed by more users as more important than total view count, otherwise will consider total view count most important- Returns:
- the list of assets that are most-viewed, in descending order (most-viewed first)
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
mostViewedAssets
public static List<AssetViews> mostViewedAssets(AtlanClient client, int maxAssets, boolean byDifferentUsers, List<String> excludeUsers) throws AtlanException Find the most-viewed assets in Atlan.- Parameters:
client
- connectivity to the Atlan tenant on which to run the searchmaxAssets
- maximum number of assets to considerbyDifferentUsers
- when true, will consider assets viewed by more users as more important than total view count, otherwise will consider total view count most importantexcludeUsers
- list of usernames to exclude from the results- Returns:
- the list of assets that are most-viewed, in descending order (most-viewed first)
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
toRequest
Translate the Atlan search log into an Atlan search log request.- Returns:
- an Atlan search log request that encapsulates the requested criteria
-
count
Return the total number of search log entries that will match the supplied criteria, using the most minimal query possible (retrieves minimal data).- Returns:
- the count of search log entries that will match the supplied criteria
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
stream
Run the search to retrieve search log entries that match the supplied criteria.- Returns:
- a stream of search log entries that match the specified criteria, lazily-fetched
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
stream
Run the search to retrieve search log entries that match the supplied criteria.- Parameters:
parallel
- if true, returns a parallel stream- Returns:
- a stream of search log entries that match the specified criteria, lazily-fetched
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
parallelStream
Run the search to retrieve search log entries that match the supplied criteria, using a parallel stream (multiple pages are retrieved in parallel for improved throughput).- Returns:
- a stream of search log entries that match the specified criteria, lazily-fetched
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
bulkStream
Run the search to retrieve search log entries that match the supplied criteria, using a stream specifically meant for streaming large numbers of results (10,000 or more). Note: this will apply its own sorting algorithm, so any sort order you have specified may be ignored.- Returns:
- a stream of search log entries that match the specified criteria, lazily-fetched
- Throws:
AtlanException
- on any issues interacting with the Atlan APIs
-
_dsl
Translate the Atlan search log search into an Atlan search DSL builder.- Returns:
- an Atlan search DSL builder that encapsulates the search log search
-
_requestBuilder
Translate the Atlan search log search into an Atlan search log request builder.- Returns:
- an Atlan search log request builder that encapsulates the search
-
_internal
-