Use send data to process suggestion

Not all suggested document is created in ELS
Need to refactor send data
This commit is contained in:
2021-08-31 02:31:32 +02:00
parent 88025347ec
commit 928efb659e
4 changed files with 77 additions and 51 deletions

View File

@@ -1,54 +1,7 @@
DELETE itunes-suggest
PUT /itunes-suggest
{
"settings": {
"index": {
"number_of_replicas": 0
},
"analysis": {
"filter": {
"french_stop": {
"type": "stop",
"stopwords": "_french_"
},
"english_stop": {
"type": "stop",
"stopwords": "_english_"
}
},
"analyzer": {
"names": {
"tokenizer": "standard",
"filter": [
"lowercase",
"asciifolding",
"french_stop",
"english_stop"
]
}
}
}
},
"mappings": {
"properties": {
"artist_suggest": {
"type": "completion",
"search_analyzer": "names"
},
"artist": {
"type": "keyword"
},
"album_suggest": {
"type": "completion",
"search_analyzer": "names"
},
"album": {
"type": "keyword"
}
}
}
}
!./mapping.suggest.json
// Also possible to specify analyze for ingesting => https://stackoverflow.com/questions/48304499/elasticsearch-completion-suggester-not-working-with-whitespace-analyzer