Skip to content

Commit

Permalink
bump versions in the various docker compose files
Browse files Browse the repository at this point in the history
upgrade libraries and gradle

elasticsearch has apparently become way more memory hungry

opensearch needs new configuration to run without passwords
  • Loading branch information
jillesvangurp committed Jun 27, 2024
1 parent 4533428 commit 9641454
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 20 deletions.
5 changes: 2 additions & 3 deletions docker-compose-es-7.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '2.2'
services:
es7:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.22
environment:
- cluster.name=docker-test-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.routing.allocation.disk.threshold_enabled=true
# make sure it works on nearly full disk
- cluster.routing.allocation.disk.watermark.low=3gb
Expand Down
5 changes: 2 additions & 3 deletions docker-compose-es-8.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '2.2'
services:
es8:
image: docker.elastic.co/elasticsearch/elasticsearch:8.9.0
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.0
environment:
- cluster.name=docker-test-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "ES_JAVA_OPTS=-Xms2048m -Xmx2048m"
- cluster.routing.allocation.disk.threshold_enabled=true
# make sure it works on nearly full disk
- cluster.routing.allocation.disk.watermark.low=3gb
Expand Down
3 changes: 1 addition & 2 deletions docker-compose-os-1.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '2.2'
services:
os1:
image: opensearchproject/opensearch:1
environment:
- cluster.name=docker-test-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.routing.allocation.disk.threshold_enabled=true
# make sure it works on nearly full disk
- cluster.routing.allocation.disk.watermark.low=3gb
Expand Down
7 changes: 3 additions & 4 deletions docker-compose-os-2.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
version: '2.2'
services:
os2:
image: opensearchproject/opensearch:2.8.0
image: opensearchproject/opensearch:2.15.0
environment:
- cluster.name=docker-test-cluster
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.routing.allocation.disk.threshold_enabled=true
# make sure it works on nearly full disk
- cluster.routing.allocation.disk.watermark.low=3gb
- cluster.routing.allocation.disk.watermark.high=2gb
- cluster.routing.allocation.disk.watermark.flood_stage=1gb
- cluster.routing.allocation.disk.threshold_enabled=false
- plugins.security.disabled=true
- DISABLE_SECURITY_PLUGIN=true
ulimits:
memlock:
soft: -1
Expand Down
4 changes: 2 additions & 2 deletions es_kibana/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.3"
# simple docker compose to play with Elasticsearch & Kibana locally
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.0
environment:
discovery.type: "single-node"
cluster.name: "docker-cluster"
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
volumes:
- data:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:8.12.0
image: docker.elastic.co/kibana/kibana:8.14.0
environment:
SERVER_NAME: localhost
ELASTICSEARCH_URL: http://es:9200
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,3 +823,21 @@ suspend fun SearchClient.msearch(

@Serializable
data class MultiSearchResponse(val took: Long, val responses: List<SearchResponse>)

fun MultiSearchResponse.rrf(k: Int = 60): List<Pair<String, Double>> {
val aggregatedScores = mutableMapOf<String, Double>()

// Score all the hits based on their aggregate ranking across the results
this.responses.forEach { searchResponse ->
// Process each SearchHit in the SearchResponse
searchResponse.hits?.hits.orEmpty().forEachIndexed { rank, searchHit ->
// Calculate the RRF score and add it to the aggregated score
val score = 1.0 / (k + rank)

aggregatedScores[searchHit.id] = (aggregatedScores[searchHit.id]?:0.0) + score
}
}

// Convert the aggregated scores to a sorted list
return aggregatedScores.toList().sortedByDescending { it.second }
}
10 changes: 5 additions & 5 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file

plugin.com.avast.gradle.docker-compose=0.17.6
plugin.com.avast.gradle.docker-compose=0.17.7

plugin.org.jetbrains.dokka=1.9.20

Expand All @@ -29,19 +29,19 @@ version.junit.jupiter=5.10.2
## # available=5.11.0-M1
## # available=5.11.0-M2

version.kotest=5.9.0
version.kotest=5.9.1

version.kotlin=2.0.0
## # available=2.0.20-Beta1

version.kotlinx.coroutines=1.8.1
## # available=1.9.0-RC

version.kotlinx.datetime=0.6.0

version.kotlinx.serialization=1.6.3
## # available=1.7.0-RC
version.kotlinx.serialization=1.7.1

version.ktor=2.3.11
version.ktor=2.3.12
### available=3.0.0-beta-1

version.org.apache.logging.log4j..log4j-to-slf4j=2.23.1
Expand Down

0 comments on commit 9641454

Please sign in to comment.