Skip to content

Commit

Permalink
Dependencies: Update elasticsearch, ... from 8.12.2 to 8.13.0 (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexklibisz-scala-steward[bot] authored Mar 31, 2024
1 parent b04a286 commit 3bd19ef
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Global / scalaVersion := "3.3.3"
Global / scalacOptions += "-explain"

lazy val CirceVersion = "0.14.6"
lazy val ElasticsearchVersion = "8.12.2"
lazy val ElasticsearchVersion = "8.13.0"
lazy val Elastic4sVersion = "8.11.5"
lazy val ElastiknnVersion = IO.read(file("version")).strip()
lazy val LuceneVersion = "9.9.1"
Expand Down
20 changes: 12 additions & 8 deletions development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ This makes it relatively easy to run tests, generate docs, publish artifacts, et

### IDE

I recommend using IntelliJ Idea to work on the Gradle projects and Pycharm to work on the client-python project.

Install the IntelliJ Scala plugin, and then IntelliJ will recognize the SBT project when you open the `elastiknn` directory.

PyCharm can be a bit of a different story.
You should first create a virtual environment in `client-python/venv`.
You can do this by running `task pyVenv`. Even if the tests fail, it will still create the virtual environment.
Then you should setup PyCharm to use the interpreter in `client-python/venv`.
I recommend using IntelliJ Idea to work on the SBT projects and Pycharm to work on the client-python project.

For IntelliJ, install the IntelliJ Scala plugin and open the `elastiknn` directory in IntelliJ.
IntelliJ should recognize the SBT project.
You might have to specify the JDK and Scala SDK; as of April 2024, we're using JDK 21 and Scala 3.3.3.
Since early 2023, we're also using some experimental JDK features which also require some additional settings.
Go to Settings > Build, Execution, Deployment > Java Compiler, and add `--add-modules jdk.incubator.vector --add-exports java.base/jdk.internal.vm.vector=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED` to the "Additional command line parameters".
Then go to Settings > Build, Execution, Deployment > Scala Compiler, and add the same parameters in the "Additional compiler options".

For Python and Pycharm, you should first create a virtual environment in `client-python/venv`.
You can do this by running `task pyCreateVenv`.
Then you should configure PyCharm to use the interpreter in `client-python/venv`.

### Testing

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:8.12.2
FROM docker.elastic.co/elasticsearch/elasticsearch:8.13.0
COPY elastiknn-plugin/target/elastiknn*.zip .
RUN elasticsearch-plugin install -b file:$(ls elastiknn*zip | sort | tail -n1)
4 changes: 2 additions & 2 deletions docs/pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Make a Dockerfile like below.
The image version (`elasticsearch:A.B.C`) must match the plugin's version (e.g. `A.B.C.x/elastiknn-A.B.C.x`).

```docker
FROM docker.elastic.co/elasticsearch/elasticsearch:8.12.2
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.12.2.1/elastiknn-8.12.2.1.zip
FROM docker.elastic.co/elasticsearch/elasticsearch:8.13.0
RUN elasticsearch-plugin install --batch https://github.com/alexklibisz/elastiknn/releases/download/8.13.0.0/elastiknn-8.13.0.0.zip
```

Build and run the Dockerfile. If you have any issues please refer to the [official docs.](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/performance/fashion-mnist/plot.b64

Large diffs are not rendered by default.

Binary file modified docs/pages/performance/fashion-mnist/plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions docs/pages/performance/fashion-mnist/results.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
|Model|Parameters|Recall|Queries per Second|
|---|---|---|---|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=500 probes=0|0.379|392.939|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=1000 probes=0|0.447|334.503|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=500 probes=3|0.635|308.154|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=1000 probes=3|0.717|270.359|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=500 probes=0|0.767|347.401|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=1000 probes=0|0.847|296.976|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=500 probes=3|0.922|238.273|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=1000 probes=3|0.960|210.018|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=500 probes=0|0.378|383.334|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=1000 probes=0|0.446|324.105|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=500 probes=3|0.635|304.168|
|eknn-l2lsh|L=100 k=4 w=1024 candidates=1000 probes=3|0.716|262.273|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=500 probes=0|0.767|339.240|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=1000 probes=0|0.847|291.800|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=500 probes=3|0.921|232.473|
|eknn-l2lsh|L=100 k=4 w=2048 candidates=1000 probes=3|0.960|206.758|
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package com.klibisz.elastiknn.query

import com.google.common.io.BaseEncoding
import com.klibisz.elastiknn.ElastiknnException.ElastiknnRuntimeException
import com.klibisz.elastiknn.api._
import com.klibisz.elastiknn.api.*
import com.klibisz.elastiknn.{ELASTIKNN_NAME, api}
import org.apache.lucene.search.Query
import org.elasticsearch.action.ActionListener
import org.elasticsearch.action.get.{GetAction, GetRequest, GetResponse}
import org.elasticsearch.action.get.{GetRequest, GetResponse}
import org.elasticsearch.client.internal.Client
import org.elasticsearch.common.io.stream.{StreamInput, StreamOutput, Writeable}
import org.elasticsearch.index.query._
import org.elasticsearch.index.query.*
import org.elasticsearch.xcontent.{ToXContent, XContentBuilder, XContentParser}
import org.elasticsearch.{ElasticsearchException, ResourceNotFoundException, TransportVersion, TransportVersions}

Expand Down Expand Up @@ -124,8 +124,7 @@ final class ElasticsearchQueryBuilder(val query: NearestNeighborsQuery, elastikn

// Request the actual document in order to construct the query
c.registerAsyncAction((client: Client, listener: ActionListener[_]) => {
client.execute(
GetAction.INSTANCE,
client.get(
new GetRequest(ixv.index, ixv.id),
new ActionListener[GetResponse] {
override def onResponse(response: GetResponse): Unit = {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.12.2.1
8.13.0.0

0 comments on commit 3bd19ef

Please sign in to comment.