mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Add spanish as an example
Adding a new language without nlp requires now only to fill out the pieces: - define a list of month names to support date recognition - add it to joex' dockerfile to be available for tesseract - update the solr migration/field definitions - update the elm file so it shows up on the client
This commit is contained in:
@ -25,6 +25,7 @@ object Field {
|
||||
val content_en = Field("content_en")
|
||||
val content_fr = Field("content_fr")
|
||||
val content_it = Field("content_it")
|
||||
val content_es = Field("content_es")
|
||||
val itemName = Field("itemName")
|
||||
val itemNotes = Field("itemNotes")
|
||||
val folderId = Field("folder")
|
||||
@ -39,6 +40,8 @@ object Field {
|
||||
Field.content_fr
|
||||
case Language.Italian =>
|
||||
Field.content_it
|
||||
case Language.Spanish =>
|
||||
Field.content_es
|
||||
}
|
||||
|
||||
implicit val jsonEncoder: Encoder[Field] =
|
||||
|
@ -41,6 +41,7 @@ object SolrQuery {
|
||||
Field.content_en,
|
||||
Field.content_fr,
|
||||
Field.content_it,
|
||||
Field.content_es,
|
||||
Field.itemName,
|
||||
Field.itemNotes,
|
||||
Field.attachmentName
|
||||
|
@ -69,6 +69,14 @@ object SolrSetup {
|
||||
solrEngine,
|
||||
"Add content_it field",
|
||||
addContentItField.map(_ => FtsMigration.Result.reIndexAll)
|
||||
),
|
||||
FtsMigration[F](
|
||||
8,
|
||||
solrEngine,
|
||||
"Add content_es field",
|
||||
addTextField(Some(Language.Spanish))(Field.content_es).map(_ =>
|
||||
FtsMigration.Result.reIndexAll
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user