| 构造器和说明 |
|---|
ESIndexer() |
ESIndexer(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.transport.TransportClient> clientPool,
String indexName) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
createIndexIfNotExist(String indexName) |
boolean |
deleteDocument(ESDocument document)
根据文档ID 删除文档
|
boolean |
deleteDocument(String docType,
String docId)
根据文件类型和ID 删除文档
|
void |
initMappingType(Class<?> objType) |
void |
initMappingType(String indexName,
Class<?> objType) |
String |
mergeDocument(ESDocument document)
合并文档
|
String |
saveNewDocument(ESDocument document)
新建 文档
|
void |
setClientPool(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.transport.TransportClient> clientPool) |
int |
updateDocument(ESDocument document)
更新文档
|
int |
updateDocument(String docId,
ESDocument document)
更新文档
|
public ESIndexer()
public ESIndexer(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.transport.TransportClient> clientPool,
String indexName)
public void setClientPool(org.apache.commons.pool2.impl.GenericObjectPool<org.elasticsearch.client.transport.TransportClient> clientPool)
public boolean createIndexIfNotExist(String indexName)
public void initMappingType(Class<?> objType)
public String saveNewDocument(ESDocument document)
saveNewDocument 在接口中 Indexerdocument - 文档public boolean deleteDocument(ESDocument document)
deleteDocument 在接口中 Indexerdocument - 文档public boolean deleteDocument(String docType, String docId)
deleteDocument 在接口中 IndexerdocType - String 文档类型docId - String 文档idpublic int updateDocument(ESDocument document)
updateDocument 在接口中 Indexerdocument - 要跟新的文档对象public int updateDocument(String docId, ESDocument document)
updateDocument 在接口中 IndexerdocId - 文档iddocument - 要更新的文档对象public String mergeDocument(ESDocument document)
mergeDocument 在接口中 Indexerdocument - ESDocumentCopyright © 2019 Centit Information Technical, co. Inc.. All rights reserved.