Add polish to processing lanugages

SOLR doesn't support polish out of the box. Plugins are required for
polish. The language has been added only with basic support. For
better results, a manual setup of solr is required.

Closes: #1345
This commit is contained in:
eikek
2022-05-21 14:34:48 +02:00
parent 81f7e4e322
commit 5ec311c331
9 changed files with 102 additions and 6 deletions

View File

@ -144,7 +144,18 @@ object SolrSetup {
"Add lithuanian",
addContentField(Language.Lithuanian)
),
SolrMigration.reIndexAll(23, "Re-Index after adding lithuanian content field")
SolrMigration.reIndexAll(23, "Re-Index after adding lithuanian content field"),
SolrMigration[F](
24,
"Add new field type for polish content",
addFieldType(AddFieldType.textPol)
),
SolrMigration[F](
25,
"Add polish",
addContentField(Language.Polish)
),
SolrMigration.reIndexAll(26, "Re-Index after adding polish content field")
)
def addFolderField: F[Unit] =
@ -297,6 +308,17 @@ object SolrSetup {
)
)
val textPol = AddFieldType(
"text_pl",
"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])