public class Elastic extends Object
Constructor and Description |
---|
Elastic()
Constructor
|
Elastic(String strServerUrl)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
create(String strIndex,
String strType,
Object object)
Create a document oof given type into a given index
|
String |
createMappings(String strIndex,
String strJsonMappings) |
String |
deleteIndex(String strIndex)
Delete a given index
|
boolean |
isExists(String strIndex)
Check if a given index exists
|
public Elastic()
public Elastic(String strServerUrl)
strServerUrl
- The Elastic server URLpublic String create(String strIndex, String strType, Object object) throws ElasticClientException
strIndex
- The indexstrType
- The document typeobject
- The documentElasticClientException
- If a problem occurs connecting Elasticpublic String deleteIndex(String strIndex) throws ElasticClientException
strIndex
- The indexElasticClientException
- If a problem occurs connecting Elasticpublic boolean isExists(String strIndex) throws ElasticClientException
strIndex
- The indexElasticClientException
- If a problem occurs connecting Elasticpublic String createMappings(String strIndex, String strJsonMappings) throws ElasticClientException
strIndex
- strJsonMappings
- ElasticClientException
Copyright © 2017 City of Paris. All rights reserved.