support searching in many more languages

This commit is contained in:
Tao Bror Bojlén 2019-08-04 15:09:32 +03:00
parent 9bcec30dd6
commit de6d997976
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
3 changed files with 133 additions and 1 deletions

View File

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- You can now click a button in the search bar to search (you can also still just prss enter, of course).
- You can now filter searches by instance type.
- Full-text search across instance descriptions now supports the following languages: arabic, armenian, basque,
bengali, brazilian, bulgarian, catalan, cjk (i.e. chinese, japanese, korean), czech, danish, dutch, english, finnish,
french, galician, german, greek, hindi, hungarian, indonesian, irish, italian, latvian, lithuanian, norwegian,
persian, romanian, russian, sorani, spanish, swedish, turkish, thai.
### Changed

View File

@ -154,7 +154,7 @@ defmodule Backend.Api do
"multi_match" => %{
"query" => query,
"fields" => [
"description.english",
"description.*",
"domain.english"
]
}

View File

@ -21,9 +21,137 @@
"description": {
"type": "text",
"fields": {
"arabic": {
"type": "text",
"analyzer": "arabic"
},
"armenian": {
"type": "text",
"analyzer": "armenian"
},
"basque": {
"type": "text",
"analyzer": "basque"
},
"bengali": {
"type": "text",
"analyzer": "bengali"
},
"brazilian": {
"type": "text",
"analyzer": "brazilian"
},
"bulgarian": {
"type": "text",
"analyzer": "bulgarian"
},
"catalan": {
"type": "text",
"analyzer": "catalan"
},
"cjk": {
"type": "text",
"analyzer": "cjk"
},
"czech": {
"type": "text",
"analyzer": "czech"
},
"danish": {
"type": "text",
"analyzer": "danish"
},
"dutch": {
"type": "text",
"analyzer": "dutch"
},
"english": {
"type": "text",
"analyzer": "english"
},
"finnish": {
"type": "text",
"analyzer": "finnish"
},
"french": {
"type": "text",
"analyzer": "french"
},
"galician": {
"type": "text",
"analyzer": "galician"
},
"german": {
"type": "text",
"analyzer": "german"
},
"greek": {
"type": "text",
"analyzer": "greek"
},
"hindi": {
"type": "text",
"analyzer": "hindi"
},
"hungarian": {
"type": "text",
"analyzer": "hungarian"
},
"indonesian": {
"type": "text",
"analyzer": "indonesian"
},
"irish": {
"type": "text",
"analyzer": "irish"
},
"italian": {
"type": "text",
"analyzer": "italian"
},
"latvian": {
"type": "text",
"analyzer": "latvian"
},
"lithuanian": {
"type": "text",
"analyzer": "lithuanian"
},
"norwegian": {
"type": "text",
"analyzer": "norwegian"
},
"persian": {
"type": "text",
"analyzer": "persian"
},
"romanian": {
"type": "text",
"analyzer": "romanian"
},
"russian": {
"type": "text",
"analyzer": "russian"
},
"sorani": {
"type": "text",
"analyzer": "sorani"
},
"spanish": {
"type": "text",
"analyzer": "spanish"
},
"swedish": {
"type": "text",
"analyzer": "swedish"
},
"turkish": {
"type": "text",
"analyzer": "turkish"
},
"thai": {
"type": "text",
"analyzer": "thai"
}
}
},