upgrade to latest elasticsearch
parent
384df5ee4d
commit
a942e2e335
|
@ -40,8 +40,8 @@ private[forumSearch] final class Indexer(
|
|||
case Reset =>
|
||||
lila.search.ElasticSearch.createType(client, indexName, typeName)
|
||||
try {
|
||||
client.putMapping(indexName) {
|
||||
typeName as (
|
||||
client execute {
|
||||
put mapping indexName / typeName as Seq(
|
||||
Fields.body typed StringType boost 2,
|
||||
Fields.topic typed StringType boost 4,
|
||||
Fields.author typed StringType,
|
||||
|
|
|
@ -37,8 +37,8 @@ private[gameSearch] final class Indexer(
|
|||
ElasticSearch.createType(client, indexName, typeName)
|
||||
try {
|
||||
import Fields._
|
||||
client.putMapping(indexName) {
|
||||
typeName as (
|
||||
client execute {
|
||||
put mapping indexName / typeName as Seq(
|
||||
status typed ShortType,
|
||||
turns typed ShortType,
|
||||
rated typed BooleanType,
|
||||
|
@ -93,9 +93,7 @@ private[gameSearch] final class Indexer(
|
|||
}
|
||||
|
||||
private def storable(game: lila.game.Game) =
|
||||
(game.finished || game.imported) && game.playedTurns > 4 && game.players.forall {
|
||||
_.rating.fold(true)(_ >= 1000)
|
||||
}
|
||||
(game.finished || game.imported) && game.playedTurns > 4
|
||||
|
||||
private def store(game: lila.game.Game, hasAnalyse: Boolean) = {
|
||||
import Fields._
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package lila.search
|
||||
|
||||
import com.sksamuel.elastic4s.ElasticDsl._
|
||||
import com.sksamuel.elastic4s.{ CountDefinition, SearchDefinition }
|
||||
|
||||
trait Query {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package lila.search
|
||||
package actorApi
|
||||
|
||||
import com.sksamuel.elastic4s.ElasticDsl._
|
||||
import com.sksamuel.elastic4s.{ CountDefinition, SearchDefinition }
|
||||
import org.elasticsearch.action.search.{ SearchResponse => ESSR }
|
||||
|
||||
case object Reset
|
||||
|
|
|
@ -2,9 +2,9 @@ package lila.teamSearch
|
|||
|
||||
import akka.actor._
|
||||
import akka.pattern.pipe
|
||||
import com.sksamuel.elastic4s.ElasticClient
|
||||
import com.sksamuel.elastic4s.ElasticDsl._
|
||||
import com.sksamuel.elastic4s.mappings.FieldType._
|
||||
import com.sksamuel.elastic4s.ElasticClient
|
||||
|
||||
import lila.search.actorApi._
|
||||
import lila.team.actorApi._
|
||||
|
@ -31,8 +31,8 @@ private[teamSearch] final class Indexer(
|
|||
case Reset =>
|
||||
lila.search.ElasticSearch.createType(client, indexName, typeName)
|
||||
try {
|
||||
client.putMapping(indexName) {
|
||||
typeName as (
|
||||
client execute {
|
||||
put mapping indexName/typeName as Seq(
|
||||
Fields.name typed StringType boost 3,
|
||||
Fields.description typed StringType boost 2,
|
||||
Fields.location typed StringType,
|
||||
|
|
|
@ -30,7 +30,7 @@ object Dependencies {
|
|||
val scalaz = "org.scalaz" %% "scalaz-core" % "7.1.2"
|
||||
val scalalib = "com.github.ornicar" %% "scalalib" % "5.3"
|
||||
val config = "com.typesafe" % "config" % "1.3.0"
|
||||
val apache = "org.apache.commons" % "commons-lang3" % "3.3.4"
|
||||
val apache = "org.apache.commons" % "commons-lang3" % "3.4"
|
||||
val guava = "com.google.guava" % "guava" % "18.0"
|
||||
val findbugs = "com.google.code.findbugs" % "jsr305" % "2.0.3"
|
||||
val hasher = "com.roundeights" %% "hasher" % "1.0.0"
|
||||
|
|
Loading…
Reference in New Issue