public interface SearchClient extends AutoCloseable
Modifier and Type | Field and Description |
---|---|
static BiFunction<SearchResponse,SearchResponse,SearchResponse> |
SRFN |
Modifier and Type | Method and Description |
---|---|
static SearchClient |
create(Properties properties)
Create search client.
|
default CompletionStage<SearchResponse> |
index(List<Search.Artifact> artifacts)
Bulk index operation.
|
CompletionStage<SearchResponse> |
index(Search.Artifact artifact)
Index the search artifact.
|
CompletionStage<Boolean> |
initialize(boolean reset)
Initialize the client
|
CompletionStage<SearchResults> |
search(String query)
Execute query.
|
close
static final BiFunction<SearchResponse,SearchResponse,SearchResponse> SRFN
static SearchClient create(Properties properties)
properties
- the propertiesCompletionStage<Boolean> initialize(boolean reset) throws Exception
reset
- should we re-initialize things; if possibleException
- for any errorCompletionStage<SearchResponse> index(Search.Artifact artifact) throws Exception
artifact
- the search artifactException
- for any errordefault CompletionStage<SearchResponse> index(List<Search.Artifact> artifacts) throws Exception
artifacts
- the search artifactsException
- for any errorCompletionStage<SearchResults> search(String query)
query
- the queryCopyright © 2020 Red Hat. All rights reserved.