public interface SearchProvider
| Modifier and Type | Method and Description |
|---|---|
void |
clearDimension()
Clears the dimension cache, and resets the indices, effectively resetting the SearchProvider to a clean state.
|
default Set<DimensionRow> |
findAllDimensionRows()
Deprecated.
Searching for dimension rows is moving to a paginated version
(
findAllDimensionRowsPaged(com.yahoo.bard.webservice.web.util.PaginationParameters)) in order to give greater control to the caller. |
Pagination<DimensionRow> |
findAllDimensionRowsPaged(PaginationParameters paginationParameters)
Return the desired page of dimension rows.
|
TreeSet<DimensionRow> |
findAllOrderedDimensionRows()
Getter for dimension rows in tree set for consistent order.
|
default TreeSet<DimensionRow> |
findFilteredDimensionRows(Set<ApiFilter> filters)
Deprecated.
Searching for filtered dimension rows is moving to a paginated version
(
findFilteredDimensionRowsPaged(java.util.Set<com.yahoo.bard.webservice.web.ApiFilter>, com.yahoo.bard.webservice.web.util.PaginationParameters))
in order to give greater control to the caller. |
Pagination<DimensionRow> |
findFilteredDimensionRowsPaged(Set<ApiFilter> filters,
PaginationParameters paginationParameters)
Return the desired page of dimension rows that match the specified filters.
|
int |
getDimensionCardinality()
Gets the number of distinct dimension rows (assuming the key field is unique) in the index.
|
default boolean |
hasAnyRows(Set<ApiFilter> filters)
Determine if any rows match these filters.
|
boolean |
isHealthy()
Method to check if search provider is healthy.
|
void |
refreshIndex(Map<String,HashDataCache.Pair<DimensionRow,DimensionRow>> changedRows)
Method to add / update indexes.
|
void |
refreshIndex(String rowId,
DimensionRow dimensionRow,
DimensionRow dimensionRowOld)
Method to add / update indexes.
|
default void |
replaceIndex(String newLuceneIndexPathString)
Replaces index with a new index in hot-swap manner.
|
void |
setDimension(Dimension dimension)
Setter for dimension.
|
void |
setKeyValueStore(KeyValueStore keyValueStore)
Setter for store.
|
void setDimension(Dimension dimension)
dimension - Dimension the SearchProvider is searchingvoid setKeyValueStore(KeyValueStore keyValueStore)
keyValueStore - KeyValueStore that holds the data rows indexed by the Search Providerint getDimensionCardinality()
@Deprecated default Set<DimensionRow> findAllDimensionRows()
findAllDimensionRowsPaged(com.yahoo.bard.webservice.web.util.PaginationParameters)) in order to give greater control to the caller.Pagination<DimensionRow> findAllDimensionRowsPaged(@NotNull PaginationParameters paginationParameters)
paginationParameters - The parameters that define a page (i.e. the number of rows per page,
and the page of results desired)TreeSet<DimensionRow> findAllOrderedDimensionRows()
@Deprecated default TreeSet<DimensionRow> findFilteredDimensionRows(Set<ApiFilter> filters)
findFilteredDimensionRowsPaged(java.util.Set<com.yahoo.bard.webservice.web.ApiFilter>, com.yahoo.bard.webservice.web.util.PaginationParameters))
in order to give greater control to the caller.filters - ApiFilters to use for finding matching dimension rowsPagination<DimensionRow> findFilteredDimensionRowsPaged(Set<ApiFilter> filters, @NotNull PaginationParameters paginationParameters)
filters - ApiFilters to use for finding matching dimension rowspaginationParameters - The parameters that define a page (i.e. the number of rows per page,
and the page of results desired)
Throws TimeoutException If the search times out.default boolean hasAnyRows(Set<ApiFilter> filters)
filters - ApiFilters to use for finding matching dimension rowsvoid refreshIndex(String rowId, DimensionRow dimensionRow, DimensionRow dimensionRowOld)
rowId - Unique ID for the dimension rowdimensionRow - New, updated dimension rowdimensionRowOld - Old dimension row if we're updating one, or null if there is no row for the rowIdvoid refreshIndex(Map<String,HashDataCache.Pair<DimensionRow,DimensionRow>> changedRows)
changedRows - Collection of newRow / oldRow pairs keyed by rowId to update the index with. Each row is a
pair of dimension rows (newRow is the key, oldRow is the value), with the rowId (ie. unique key in the dimension)
as the top-level Map key.boolean isHealthy()
default void replaceIndex(String newLuceneIndexPathString)
newLuceneIndexPathString - The location of directory that contains the the new index.void clearDimension()
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.