Accessing ElasticSearch

Read(142) Label: elasticcli,

1. Download the following jars for connecting to the ElasticSearch server from elsticsearch official website and put them in esProc external library folder. The directory containing files of this external library is: installation directory\esProc\extlib\ElasticsearchCli. The Raqsoft core jar for this external library is ElasticsearchCli.jar.

commons-beanutils.jar

commons-lang-2.1.jar

commons-codec-1.10.jar

elasticsearch-6.2.1.jar

elasticsearch-cli-6.2.1.jar

elasticsearch-core-6.2.1.jar

elasticsearch-rest-client-6.2.1.jar

ezmorph-1.0.2.jar

httpasyncclient-4.1.2.jar

httpclient-4.5.2.jar

httpcore-4.4.5.jar

httpcore-nio-4.4.5.jar

jackson-core-2.8.10.jar

jackson-dataformat-cbor-2.8.10.jar

jackson-dataformat-smile-2.8.10.jar

jackson-dataformat-yaml-2.8.10.jar

lucene-analyzers-common-7.2.1.jar

lucene-backward-codecs-7.2.1.jar

lucene-core-7.2.1.jar

lucene-grouping-7.2.1.jar

lucene-highlighter-7.2.1.jar

lucene-join-7.2.1.jar

lucene-memory-7.2.1.jar

lucene-misc-7.2.1.jar

lucene-queries-7.2.1.jar

lucene-queryparser-7.2.1.jar

lucene-sandbox-7.2.1.jar

lucene-spatial3d-7.2.1.jar

lucene-spatial-7.2.1.jar

lucene-spatial-extras-7.2.1.jar

lucene-suggest-7.2.1.jar

json-lib-1.1-JDK13.jar

Note: The third-party jars are provided within the package and users can choose appropriate ones for specific scenarios.

 

2. A JRE version 1.7 or above is required. The embedded JRE version in esProc is JRE1.6. Users need to install a higher version and configure java_home in the config.txt under installation directory\esProc\bin. If a JDK version 1.7 or above has been chosen when installing esProc, just ignore this step.

 

3. Users can manually change the size of memory if the default size isn’t large enough for needs. Two ways to manage memory under Windows are available: Change the memory settings in config.txt when starting esProc through the executable file; and in the .bat file when starting the application through the batch file. Under Linux, change the memory size in the .sh file.

Below is the method of changing memory settings in config.txt under Windows:

java_home=C:\ProgramFiles\Java\JDK1.7.0_11;esproc_port=48773;jvm_args=-Xms256m-XX:PermSize=256M-XX:MaxPermSize=512M-Xmx9783m-Duser.language=zh

 

4. esProc provides multiple library functions -es_open (), es_close (), es_get (), es_post (), es_put (), es_head (), and es_delete() - to access the ElasticSearch. Look up them inHelp-Function referenceto find the uses.