Skip to content

Commit

Permalink
update elastic4s
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Feb 7, 2024
1 parent ec5723e commit 8a667f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency.spring.version>5.3.31</dependency.spring.version>
<spring.security.version>5.5.8</spring.security.version>
<jdbc.postgresql.version>42.7.1</jdbc.postgresql.version>
<elastic4s.version>7.13.0</elastic4s.version>
<elastic4s.version>7.17.4</elastic4s.version>
<scala.version>2.13.12</scala.version>
<scala.suffix>2.13</scala.suffix>
<activemq.version>5.18.3</activemq.version>
Expand Down Expand Up @@ -304,7 +304,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.7.1</version>
<version>2.13.5</version>
</dependency>

<dependency>
Expand Down
7 changes: 4 additions & 3 deletions src/main/scala/ru/org/linux/search/SearchViewer.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2023 Linux.org.ru
* Copyright 1998-2024 Linux.org.ru
* 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
Expand All @@ -20,6 +20,7 @@ import com.sksamuel.elastic4s.ElasticDsl.*
import com.sksamuel.elastic4s.requests.searches.SearchResponse
import com.sksamuel.elastic4s.requests.searches.queries.Query
import com.sksamuel.elastic4s.requests.searches.queries.funcscorer.WeightScore
import com.sksamuel.elastic4s.requests.searches.queries.matches.MatchQuery
import org.joda.time.DateTimeZone

import scala.concurrent.Await
Expand All @@ -34,8 +35,8 @@ class SearchViewer(query: SearchRequest, elastic: ElasticClient) {
} else {
boolQuery().
should(
commonTermsQuery("title", queryText) lowFreqMinimumShouldMatch 2,
commonTermsQuery("message", queryText) lowFreqMinimumShouldMatch 2,
MatchQuery("title", queryText).minimumShouldMatch("2"),
MatchQuery("message", queryText).minimumShouldMatch("2"),
matchPhraseQuery("message", queryText)).minimumShouldMatch(1)
}
}
Expand Down

0 comments on commit 8a667f6

Please sign in to comment.