diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e1c9b3..98c5f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/backend/lib/backend/api.ex b/backend/lib/backend/api.ex index 7ba78b3..400ee95 100644 --- a/backend/lib/backend/api.ex +++ b/backend/lib/backend/api.ex @@ -154,7 +154,7 @@ defmodule Backend.Api do "multi_match" => %{ "query" => query, "fields" => [ - "description.english", + "description.*", "domain.english" ] } diff --git a/backend/priv/elasticsearch/instances.json b/backend/priv/elasticsearch/instances.json index 714889b..c335ffa 100644 --- a/backend/priv/elasticsearch/instances.json +++ b/backend/priv/elasticsearch/instances.json @@ -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" } } },