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!
-
Clone the source:
git clone github.com/koushikr/jelastic
-
Build
mvn install
JElasticBundle jBundle = new JElasticBundle() {
public JElasticConfiguration getElasticConfiguration(T configuration) {
...
}
}
@Override
public void initialize(final Bootstrap...) {
bootstrap.addBundle(jBundle);
}
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)
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>
jelastic | es client |
---|---|
7.2.0-7 | 7.2.0 (rest high level client) |
jelastic:
clusterName: elasticsearch
servers:
- localhost:9200
failOnYellow: false
settingsFile: ~/configs/settings.xml
maxResultSize: 10000
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.