mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-05 19:09:32 +00:00
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:
commit
aaaa3b98e0
@ -164,10 +164,15 @@ object SolrSetup {
|
|||||||
),
|
),
|
||||||
SolrMigration[F](
|
SolrMigration[F](
|
||||||
29,
|
29,
|
||||||
|
"Add new field type for ukrainian content",
|
||||||
|
addFieldType(AddFieldType.textUkr)
|
||||||
|
),
|
||||||
|
SolrMigration[F](
|
||||||
|
30,
|
||||||
"Add Ukrainian",
|
"Add Ukrainian",
|
||||||
addContentField(Language.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] =
|
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 Filter(`class`: String, attr: Map[String, String])
|
||||||
final case class Tokenizer(`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])
|
final case class Analyzer(tokenizer: Tokenizer, filter: List[Filter])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user