| Constructor and Description |
|---|
ESIndexer(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.RestHighLevelClient> clientPool,
String indexName,
Class<?> objType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteDocument(ESDocument document)
根据文档ID 删除文档
|
boolean |
deleteDocument(String docId)
根据文件类型和ID 删除文档
|
String |
mergeDocument(ESDocument document)
合并文档
|
String |
saveNewDocument(ESDocument document)
新建 文档
|
void |
setClientPool(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.RestHighLevelClient> clientPool) |
int |
updateDocument(ESDocument document)
更新文档
|
int |
updateDocument(String docId,
ESDocument document)
更新文档
|
public void setClientPool(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.RestHighLevelClient> clientPool)
public String saveNewDocument(ESDocument document)
saveNewDocument in interface Indexerdocument - 文档public boolean deleteDocument(ESDocument document)
deleteDocument in interface Indexerdocument - 文档public boolean deleteDocument(String docId)
deleteDocument in interface IndexerdocId - String 文档idpublic int updateDocument(ESDocument document)
updateDocument in interface Indexerdocument - 要跟新的文档对象public int updateDocument(String docId, ESDocument document)
updateDocument in interface IndexerdocId - 文档iddocument - 要更新的文档对象public String mergeDocument(ESDocument document)
mergeDocument in interface Indexerdocument - ESDocumentCopyright © 2024 江苏南大先腾信息产业股份有限公司. All rights reserved.