Skip to content

A java interface on top of Elastic search to provide with a functional query language.

License

Notifications You must be signed in to change notification settings

bhativ1303/jelastic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")
                                        .type("testType")
                                        .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-4</version>
</dependency>

Version support

jelastic es transport client
7.2.0-5 7.2.0
7.2.0-4 7.2.0

Configuration

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

Contributors

LICENSE

Copyright 2019 Koushik R [email protected].

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.

About

A java interface on top of Elastic search to provide with a functional query language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%