Merge pull request #1988 from eikek/fix-solr-uk-setup

Solr doesn't define a ukrainian text field by default
This commit is contained in:
mergify[bot] 2023-03-06 20:38:23 +00:00 committed by GitHub
commit aaaa3b98e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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])