Solr doesn't define a ukrainian text field by default

This commit is contained in:
eikek 2023-03-06 21:22:35 +01:00
parent aad73824d7
commit df98a4c069

View File

@ -164,10 +164,15 @@ object SolrSetup {
),
SolrMigration[F](
29,
"Add new field type for ukrainian content",
addFieldType(AddFieldType.textUkr)
),
SolrMigration[F](
30,
"Add Ukrainian",
addContentField(Language.Ukrainian)
),
SolrMigration.reIndexAll(30, "Re-Index after adding Estonian and Ukrainian")
SolrMigration.reIndexAll(31, "Re-Index after adding Estonian and Ukrainian")
)
def addFolderField: F[Unit] =
@ -331,6 +336,17 @@ object SolrSetup {
)
)
val textUkr = AddFieldType(
"text_uk",
"solr.TextField",
Analyzer(
Tokenizer("solr.StandardTokenizerFactory", Map.empty),
List(
Filter("solr.LowerCaseFilterFactory", Map.empty)
)
)
)
final case class Filter(`class`: String, attr: Map[String, String])
final case class Tokenizer(`class`: String, attr: Map[String, String])
final case class Analyzer(tokenizer: Tokenizer, filter: List[Filter])