elasticsearch: fix dashes in filter searches - closes #163
TODO: re-index 80M docs.
This commit is contained in:
parent
ced950197d
commit
6870b677be
|
@ -2,9 +2,11 @@ package lila.forumSearch
|
|||
|
||||
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
|
||||
import elastic4s.SimpleAnalyzer
|
||||
import elastic4s.ElasticClient
|
||||
import elastic4s.ElasticDsl._
|
||||
import elastic4s.mappings.FieldType._
|
||||
|
||||
import lila.forum.actorApi._
|
||||
import lila.forum.{ Post, PostLiteView, PostApi }
|
||||
|
@ -44,7 +46,7 @@ private[forumSearch] final class Indexer(
|
|||
put mapping indexName / typeName as Seq(
|
||||
Fields.body typed StringType boost 2,
|
||||
Fields.topic typed StringType boost 4,
|
||||
Fields.author typed StringType,
|
||||
Fields.author typed StringType index "not_analyzed",
|
||||
Fields.topicId typed StringType,
|
||||
Fields.staff typed BooleanType,
|
||||
Fields.troll typed BooleanType,
|
||||
|
|
|
@ -39,18 +39,18 @@ private[gameSearch] final class Indexer(
|
|||
import Fields._
|
||||
client execute {
|
||||
put mapping indexName / typeName as Seq(
|
||||
status typed ShortType,
|
||||
turns typed ShortType,
|
||||
rated typed BooleanType,
|
||||
variant typed ShortType,
|
||||
uids typed StringType,
|
||||
winner typed StringType,
|
||||
averageRating typed ShortType,
|
||||
ai typed ShortType,
|
||||
opening typed StringType,
|
||||
date typed DateType format ElasticSearch.Date.format,
|
||||
duration typed ShortType,
|
||||
analysed typed BooleanType
|
||||
status typed ShortType index "not_analyzed",
|
||||
turns typed ShortType index "not_analyzed",
|
||||
rated typed BooleanType index "not_analyzed",
|
||||
variant typed ShortType index "not_analyzed",
|
||||
uids typed StringType index "not_analyzed",
|
||||
winner typed StringType index "not_analyzed",
|
||||
averageRating typed ShortType index "not_analyzed",
|
||||
ai typed ShortType index "not_analyzed",
|
||||
opening typed StringType index "not_analyzed",
|
||||
date typed DateType format ElasticSearch.Date.format index "not_analyzed",
|
||||
duration typed ShortType index "not_analyzed",
|
||||
analysed typed BooleanType index "not_analyzed"
|
||||
)
|
||||
}
|
||||
import scala.concurrent.Await
|
||||
|
|
Loading…
Reference in a new issue