Liking cljdoc? Tell your friends :D

JElastic Travis build status

Your mind is like a tunnel that has no end, and a baloon, that even too much air cannot burst.

  • by Michael Bassey Johnson

So you can be 'fantastic' or 'elastic' but can you ever be both lol??

  • by Amber J.

JElastic is for using elasticsearch within application paradigm without setting your hair on fire about the internal client details. And oh, it is a dropwizard bundle!

Build instructions

  • Clone the source:

    git clone github.com/koushikr/jelastic
    
  • Build

    mvn install
    

Using JElastic bundle

Bootstrap

     JElasticBundle jBundle = new JElasticBundle() {
            
            public JElasticConfiguration getElasticConfiguration(T configuration) {
                ...
            }
        }
            
    @Override
    public void initialize(final Bootstrap...) {
        bootstrap.addBundle(jBundle);
    }

Search Request

      SearchRequest searchRequest = SearchRequest.builder()
                                        .index("testIndex")
                                        .query(Query.builder()
                                               .filters(Sets.newHashSet())
                                               .sorters(Sets.newHashSet())
                                               .pageWindow(
                                                   PageWindow.builder()
                                                       .pageNumber(pageNumber)
                                                       .pageSize(pageSize)
                                                       .build()
                                               )
                                               .build()
                                        )
                                        .klass(Example.class)
                                        .build();
      
      List<T> sources = jBundle.getRepository().search(searchRequest)

Maven Dependency

Use the following repository:

<repository>
    <id>clojars</id>
    <name>Clojars repository</name>
    <url>https://clojars.org/repo</url>
</repository>

Use the following maven dependency

<dependency>
    <groupId>io.github.jelastic</groupId>
    <artifactId>jelastic</artifactId>
    <version>7.2.0-7-SNAPSHOT</version>
</dependency>

Version support

jelastices client
7.2.0-77.2.0 (rest high level client)

Configuration

jelastic:
  clusterName: elasticsearch
  servers:
    - localhost:9200
  failOnYellow: false
  settingsFile: ~/configs/settings.xml
  maxResultSize: 10000    

Contributors

LICENSE

Copyright 2019 Koushik R rkoushik.14@gmail.com.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Can you improve this documentation? These fine people already did:
Koushik Ramachandra, sunil.rajashekar, Koushik R, Avanish Pandey & Mukesh Verma
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close