Complete the code to define a synonym filter named "synonym_filter".
{
"settings": {
"analysis": {
"filter": {
"synonym_filter": {
"type": "[1]",
"synonyms": ["quick,fast"]
}
}
}
}
}The filter type for synonyms in Elasticsearch is synonym.
Complete the analyzer definition to use the synonym filter.
{
"settings": {
"analysis": {
"analyzer": {
"synonym_analyzer": {
"tokenizer": "standard",
"filter": ["lowercase", "[1]"]
}
}
}
}
}The analyzer must include the synonym filter named synonym_filter to apply synonyms.
Fix the error in the synonym filter definition by completing the missing setting.
{
"settings": {
"analysis": {
"filter": {
"my_synonym_filter": {
"type": "synonym",
"synonyms_path": "[1]"
}
}
}
}
}The synonyms_path should be a relative path or filename accessible by Elasticsearch, commonly just the filename like synonyms.txt.
Fill both blanks to create a synonym filter that expands synonyms and ignore case.
{
"settings": {
"analysis": {
"filter": {
"expanded_synonym": {
"type": "[1]",
"expand": [2],
"synonyms": ["car, automobile"]
}
}
}
}
}The filter type is synonym and setting expand to true makes synonyms expand.
Fill all three blanks to define an analyzer that uses the synonym filter, lowercase filter, and standard tokenizer.
{
"settings": {
"analysis": {
"analyzer": {
"custom_synonym_analyzer": {
"tokenizer": "[1]",
"filter": ["[2]", "[3]"]
}
}
}
}
}The analyzer uses the standard tokenizer, then applies lowercase and synonym_filter filters.