public class ElasticSearchClientImpl extends Object implements ElasticSearchClient
| Modifier and Type | Method and Description |
|---|---|
boolean |
connected() |
io.vertx.core.json.JsonObject |
createDocument(String index,
String documentId,
io.vertx.core.json.JsonObject source)
create document from json object, must specify document id
|
Boolean |
createDocuments(String index,
io.vertx.core.json.JsonArray documents) |
Boolean |
createDocuments(String index,
io.vertx.core.json.JsonArray documents,
String keyField) |
io.vertx.core.json.JsonObject |
createIndex(String index,
ConcurrentMap<String,Class<?>> mappings) |
io.vertx.core.json.JsonObject |
createIndex(String index,
int numberOfShards,
int numberOfReplicas,
ConcurrentMap<String,Class<?>> mappings)
create index with settings and mappings
|
io.vertx.core.json.JsonObject |
deleteDocument(String index,
String documentId)
delete document by document id
|
Boolean |
deleteDocuments(String index,
Set<String> ids) |
io.vertx.core.json.JsonObject |
deleteIndex(String index)
delete index by name
|
io.vertx.core.json.JsonObject |
getDocument(String index,
String documentId)
get document by document id
|
io.vertx.core.json.JsonObject |
getIndex(String index)
get index information
|
io.vertx.core.json.JsonObject |
search(io.vertx.core.json.JsonObject params)
get search result from ElasticSearch by search text
|
io.vertx.core.json.JsonObject |
search(io.vertx.core.json.JsonObject params,
ConcurrentMap<String,String> precisionMap) |
io.vertx.core.json.JsonObject |
updateDocument(String index,
String documentId,
io.vertx.core.json.JsonObject source)
update document from json object, must specify document id
|
Boolean |
updateDocuments(String index,
io.vertx.core.json.JsonArray documents) |
Boolean |
updateDocuments(String index,
io.vertx.core.json.JsonArray documents,
String keyField) |
io.vertx.core.json.JsonObject |
updateIndex(String index) |
io.vertx.core.json.JsonObject |
updateIndex(String index,
int numberOfShards,
int numberOfReplicas)
delete index
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateSharedpublic boolean connected()
connected in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject getIndex(String index)
ElasticSearchClientget index information
getIndex in interface ElasticSearchClientindex - name of indexpublic io.vertx.core.json.JsonObject deleteIndex(String index)
ElasticSearchClientdelete index by name
deleteIndex in interface ElasticSearchClientindex - name of indexpublic io.vertx.core.json.JsonObject createIndex(String index, ConcurrentMap<String,Class<?>> mappings)
createIndex in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject createIndex(String index, int numberOfShards, int numberOfReplicas, ConcurrentMap<String,Class<?>> mappings)
ElasticSearchClientcreate index with settings and mappings
createIndex in interface ElasticSearchClientindex - name of index. this is real index namenumberOfShards - number of shards, default is 3numberOfReplicas - number of replicas, default is 2mappings - fields were used to create index mappingpublic io.vertx.core.json.JsonObject updateIndex(String index)
updateIndex in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject updateIndex(String index, int numberOfShards, int numberOfReplicas)
ElasticSearchClientdelete index
updateIndex in interface ElasticSearchClientindex - name of indexnumberOfShards - number of shardsnumberOfReplicas - number of replicaspublic io.vertx.core.json.JsonObject createDocument(String index, String documentId, io.vertx.core.json.JsonObject source)
ElasticSearchClientcreate document from json object, must specify document id
createDocument in interface ElasticSearchClientindex - name of indexdocumentId - document idsource - json object of documentpublic Boolean createDocuments(String index, io.vertx.core.json.JsonArray documents)
createDocuments in interface ElasticSearchClientpublic Boolean createDocuments(String index, io.vertx.core.json.JsonArray documents, String keyField)
createDocuments in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject getDocument(String index, String documentId)
ElasticSearchClientget document by document id
getDocument in interface ElasticSearchClientindex - name of indexdocumentId - document idpublic io.vertx.core.json.JsonObject updateDocument(String index, String documentId, io.vertx.core.json.JsonObject source)
ElasticSearchClientupdate document from json object, must specify document id
updateDocument in interface ElasticSearchClientindex - name of indexdocumentId - document idsource - json object of documentpublic Boolean updateDocuments(String index, io.vertx.core.json.JsonArray documents)
updateDocuments in interface ElasticSearchClientpublic Boolean updateDocuments(String index, io.vertx.core.json.JsonArray documents, String keyField)
updateDocuments in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject deleteDocument(String index, String documentId)
ElasticSearchClientdelete document by document id
deleteDocument in interface ElasticSearchClientindex - name of indexdocumentId - document idpublic Boolean deleteDocuments(String index, Set<String> ids)
deleteDocuments in interface ElasticSearchClientpublic io.vertx.core.json.JsonObject search(io.vertx.core.json.JsonObject params)
ElasticSearchClientget search result from ElasticSearch by search text
search in interface ElasticSearchClientparams - params will be used to search, format likes below { “index”: "“, — required ”searchText“: ”“, — required ”from“: 0, — default is 0 ”size": 10 — default is 10 }public io.vertx.core.json.JsonObject search(io.vertx.core.json.JsonObject params,
ConcurrentMap<String,String> precisionMap)
search in interface ElasticSearchClientCopyright © 2020. All rights reserved.