Skip to content

fix(sort): correct kind for score sort #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cc703e5
Upgrade Parsson from 1.0.0 to 1.0.5 (#722)
apupier Jan 24, 2024
43b7022
Update Parsson, add test for big numbers (#730)
swallez Jan 24, 2024
280f846
fixed copypaste typo
l-trotta Jan 24, 2024
137b731
Example realworldapp backend (#737)
l-trotta Feb 1, 2024
f2f79a6
Make the code generation warning more visible
swallez Feb 7, 2024
d78feca
[codegen] Update to latest API spec
swallez Feb 9, 2024
65aca87
Update buildkite pipeline branches
swallez Feb 15, 2024
a0c99e8
Bump version
swallez Feb 19, 2024
f0f81a6
Bump version in generated code
swallez Feb 19, 2024
d4baa91
Update release highlights
swallez Feb 19, 2024
25a65cf
fixes-from-pr-2412 (#745)
l-trotta Feb 20, 2024
5c6487c
[DOCS] Adds compatibility matrix to docs and README. (#749)
szabosteve Feb 22, 2024
e327861
fixes from api-spec pr 2440 (#756)
l-trotta Mar 7, 2024
1c7fce1
removed unused classes
l-trotta Mar 7, 2024
d2b3b06
[codegen] Update serveless code
swallez Mar 12, 2024
b5aed69
Add misc improvements to the framework (#760)
swallez Mar 12, 2024
d1dfacd
Add ES|QL helpers (#762)
swallez Mar 13, 2024
d0f1aad
public object adapter class, comment (#764)
l-trotta Mar 14, 2024
a5ecc5e
[codegen] Update to latest API spec
swallez Mar 13, 2024
c074f83
Update Jackson version (#768)
swallez Mar 26, 2024
7eb733f
8.13 release doc
l-trotta Mar 28, 2024
5f277ee
[codegen] Update to latest API spec
l-trotta Apr 5, 2024
4eb0276
fixes from api-spec pr 2485 (#776)
l-trotta Apr 5, 2024
fdd4c16
add gradlew validation workflow (#778)
l-trotta Apr 8, 2024
7d10422
fix(sort): correct kind for score sort
mychalvlcek Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- label: ":java: :elasticsearch: Elasticsearch Java API client - {{matrix.workflow}}"
agents:
provider: "gcp"
branches: [ "main", "7.17", "8.11", "8.12" ]
branches: [ "main", "7.17", "8.12", "8.13" ]
matrix:
setup:
workflow:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
attributes:
value: |
Please first search existing issues for the feature you are requesting. It may already exist, even as a closed issue.
If it exists, please add a comment: along with subcribing you to the issue, this will help us prioritize features.
If it exists, please add a comment: along with subscribing you to the issue, this will help us prioritize features.
- type: textarea
id: description
attributes:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "Validate Gradle Wrapper"
on: [push, pull_request]

jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ of the getting started documentation.
Refer to the [Connecting section](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/getting-started-java.html#_connecting)
of the getting started documentation.

## Compatibility

The Elasticsearch client is compatible with currently maintained Java versions.

The Java client is forward compatible; meaning that the client supports
communicating with greater or equal minor versions of Elasticsearch without
breaking. It does not mean that the client automatically supports new features
of newer Elasticsearch versions; it is only possible after a release of a new
client version. For example, a 8.12 client version won't automatically support
the new features of the 8.13 version of Elasticsearch, the 8.13 client version
is required for that. Elasticsearch language clients are only backwards
compatible with default distributions and without guarantees made.

| Elasticsearch Version | Elasticsearch-Java Branch | Supported |
| --------------------- | ------------------------- | --------- |
| main | main | |
| 8.x | 8.x | 8.x |
| 7.x | 7.x | 7.17 |

## Usage

- [Creating an index](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/getting-started-java.html#_creating_an_index)
Expand Down
2 changes: 1 addition & 1 deletion config/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.13.0
8.14.0
6 changes: 3 additions & 3 deletions docs/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ show usage with Jackson.
--------------------------------------------------
dependencies {
implementation 'co.elastic.clients:elasticsearch-java:{version}'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
}
--------------------------------------------------

Expand All @@ -47,7 +47,7 @@ dependencies:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.3</version>
<version>2.17.0</version>
</dependency>

</dependencies>
Expand Down Expand Up @@ -158,7 +158,7 @@ include-tagged::{doc-tests-src}/usage/IndexingTest.java[single-doc-delete]

["source","java"]
--------------------------------------------------
include-tagged::{doc-tests-src}/usage/IndexingTest.java[create-products-index]
include-tagged::{doc-tests-src}/usage/IndexingTest.java[delete-products-index]
--------------------------------------------------


Expand Down
20 changes: 16 additions & 4 deletions docs/introduction.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ provides strongly typed requests and responses for all {es} APIs.
[discrete]
=== Elasticsearch server compatibility policy

The {es} Java client is forward compatible; meaning that the client supports
communicating with greater or equal minor versions of {es}. {es} language
clients are only backwards compatible with default distributions and without
guarantees made.
The {es} Java client is forward compatible; meaning that the client supports
communicating with greater or equal minor versions of {es} without breaking. It
does not mean that the client automatically supports new features of newer
{es} versions; it is only possible after a release of a new client version. For
example, a 8.12 client version won't automatically support the new features of
the 8.13 version of {es}, the 8.13 client version is required for that. {es}
language clients are only backwards compatible with default distributions and
without guarantees made.

|===
| Elasticsearch Version | Elasticsearch-Java Branch | Supported

| main | main |
| 8.x | 8.x | 8.x
| 7.x | 7.x | 7.17
|===
11 changes: 11 additions & 0 deletions docs/release-notes/release-highlights.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ These are the important new features and changes in minor releases. Every releas

For a list of detailed changes, including bug fixes, please see the https://github.com/elastic/elasticsearch-java/releases[GitHub project realease notes].

[discrete]
==== Version 8.13

* Add ES|QL helpers - https://github.com/elastic/elasticsearch-java/pull/763[#763]
* Add an example SpringBoot application - https://github.com/elastic/elasticsearch-java/pull/737[#737]

[discrete]
==== Version 8.12

* No new feature.

[discrete]
==== Version 8.11

Expand Down
4 changes: 2 additions & 2 deletions docs/setup/installation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ available at https://snapshots.elastic.co/maven/.
--------------------------------------------------
dependencies {
implementation 'co.elastic.clients:elasticsearch-java:{version}'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
}
--------------------------------------------------

Expand All @@ -50,7 +50,7 @@ dependencies:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.3</version>
<version>2.17.0</version>
</dependency>

</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion example-transports/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ java {


dependencies {
val jacksonVersion = "2.13.3"
val jacksonVersion = "2.17.0"

api("io.netty", "netty-codec-http", "4.1.93.Final")

Expand Down
76 changes: 76 additions & 0 deletions examples/realworld-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ![RealWorld Example App](rw-logo.png)

> ### Spring Boot + Elasticsearch codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API

### [RealWorld](https://github.com/gothinkster/realworld)

This codebase was created to demonstrate a fully fledged fullstack application built with **Java + Spring Boot +
Elasticsearch** including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the **Java + Spring Boot + Elasticsearch** community styleguides & best
practices.

For more information on how to this works with other frontends/backends, head over to
the [RealWorld](https://github.com/gothinkster/realworld) repo.

# How it works

The application was made mainly demonstrate the
new [Elasticsearch Java API Client](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html).

The application was built with:

- [Java](https://www.java.com/en/) as programming language
- [Spring Boot](https://spring.io/projects/spring-boot) as dependency injection framework
- [Gradle](https://github.com/gradle/gradle) as build tool
- [Elasticsearch](https://github.com/elastic/elasticsearch) as database
- [Jackson](https://github.com/FasterXML/jackson-core) as data bind serialization/deserialization
- [Java JWT](https://github.com/jwtk/jjwt) for JWT implementation
- [Jaxb](https://github.com/jakartaee/jaxb-api) for JWT parsing
- [Slugify](https://github.com/slugify/slugify) for slug

Tests:

- [Junit](https://github.com/junit-team/junit4)
- [Testcontainers](https://github.com/testcontainers) to create an Elasticsearch instance

#### Structure

This is a multimodule gradle project:

- rw-database
- Elasticsearch client connection, queries, document classes
- rw-rest
- Spring rest controllers
- rw-server
- Configuration and entrypoint. Main class: [SpringBootApp.java](rw-server/src/main/java/realworld/SpringBootApp.java)

# Getting started

#### JVM

A version of the JVM has to be installed, openjdk version "21.0.2" was used during development.

#### Elasticsearch

An Elasticsearch instance needs to be running for the application to start successfully.
To start one easily, a [docker-compose](docker-compose.yaml) is provided, it will start Elasticsearch on port 9200 and
Kibana on [5601](http://localhost:5601/app/home#/); otherwise, the connection properties can be changed in [application.properties](rw-server/src/main/resources/application.properties).

### Build:

> ./gradlew clean build

#### Start the server:

> ./gradlew run

#### Run

The application will start on [8080](http://localhost:8080/api) with `api` context, it can be changed
in [application.properties](rw-server/src/main/resources/application.properties).

### Unit tests

A basic [unit test](rw-database/src/test/java/realworld/db/UserServiceTest.java) using testcontainer (docker is
required).
25 changes: 25 additions & 0 deletions examples/realworld-app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'application'
}

group = 'realworldapp'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '21'
}

repositories {
mavenCentral()
}

dependencies {
implementation('org.springframework.boot:spring-boot-starter-parent:3.2.0')
implementation('realworldapp:rw-server')
}

mainClassName = 'rw-server/src/main/java/realworld/SpringBootApp.java'

29 changes: 29 additions & 0 deletions examples/realworld-app/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.1
container_name: es
environment:
"discovery.type": "single-node"
"xpack.security.enabled": "false"
"xpack.security.http.ssl.enabled": "false"
ports:
- "9200:9200"
networks:
- elastic
kibana:
image: docker.elastic.co/kibana/kibana:8.7.1
container_name: kibana
environment:
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: d1a66dfd-c4d3-4a0a-8290-2abcb83ab3aa
ports:
- 5601:5601
networks:
- elastic
deploy:
resources:
limits:
cpus: '2.0'
reservations:
cpus: '1.0'
networks:
elastic:
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading