(back) Suggester V1: Process artist data

(cherry picked from commit 02f5705fde37e1aaef5c68de62aafe45fc86d490)
This commit is contained in:
2021-07-30 16:28:07 +02:00
parent 797c88f946
commit 436edaf3f2
2 changed files with 101 additions and 0 deletions

58
suggester.es Normal file
View File

@@ -0,0 +1,58 @@
DELETE itunes-suggest
PUT /itunes-suggest
{
"settings": {
"analysis": {
"filter": {
"french_stop": {
"type": "stop",
"stopwords": "_french_"
},
"english_stop": {
"type": "stop",
"stopwords": "_english_"
}
},
"analyzer": {
"artist_name": {
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"french_stop",
"english_stop"
]
}
}
}
},
"mappings": {
"properties": {
"artist_suggest": {
"type": "completion"
},
"artist": {
"type": "keyword"
}
}
}
}
GET itunes-suggest/_analyze
{
"analyzer": "artist_name",
"text": "the servent"
}
POST itunes-suggest/_search
{
"suggest": {
"name-suggest": {
"prefix": "sou",
"completion": {
"field": "artist_suggest"
}
}
}
}