public class RestSearchClient extends InfinispanSearchClient
Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.databind.ObjectMapper |
mapper |
cacheName, COMMON_PROTO_KEY, JSON_CACHE_CONFIG, log, PROTO_CACHE, SEARCH_CACHE_DEFAULT, SEARCH_PROTO_KEY, TYPE, XML_CACHE_CONFIG
SRFN
Constructor and Description |
---|
RestSearchClient(Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected int |
defaultPort() |
CompletionStage<SearchResponse> |
index(Search.Artifact artifact)
Index the search artifact.
|
CompletionStage<Boolean> |
initialize(boolean reset)
Initialize the client
|
protected void |
initialize(Properties properties,
String host,
int port,
String username,
String password,
String cacheName) |
CompletionStage<SearchResults> |
search(String query)
Execute query.
|
protected String |
toJson(Search.Artifact artifact) |
toFqn, toKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, index
public RestSearchClient(Properties properties)
protected int defaultPort()
defaultPort
in class InfinispanSearchClient
protected void initialize(Properties properties, String host, int port, String username, String password, String cacheName)
initialize
in class InfinispanSearchClient
protected String toJson(Search.Artifact artifact) throws Exception
Exception
public CompletionStage<Boolean> initialize(boolean reset) throws Exception
SearchClient
reset
- should we re-initialize things; if possibleException
- for any errorpublic CompletionStage<SearchResponse> index(Search.Artifact artifact) throws Exception
SearchClient
artifact
- the search artifactException
- for any errorpublic CompletionStage<SearchResults> search(String query)
SearchClient
query
- the querypublic void close()
Copyright © 2020 Red Hat. All rights reserved.