mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
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:
@ -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])
|
||||
|
Reference in New Issue
Block a user