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:
Eike Kettner
2021-01-17 12:18:23 +01:00
parent 360cad3304
commit 26dff18ae0
8 changed files with 49 additions and 2 deletions

View File

@ -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] =

View File

@ -41,6 +41,7 @@ object SolrQuery {
Field.content_en,
Field.content_fr,
Field.content_it,
Field.content_es,
Field.itemName,
Field.itemNotes,
Field.attachmentName

View File

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