スペースを含む名前(テキスト)を検索すると、問題が発生します。次のようなマッピングがあります
"{"user":{"properties":{"name":{"type":"string"}}}}"
理想的には、次のように結果を返してランク付けする必要があります
1) Bring on top names that exact match the search term (highest score)
2) Names that starts with the search term (high score)
3) Names that contains the exact search term as substring (medium score)
4) Names that contains any of the search term token (lowest score)
例 elasticsearch の次の名前の場合
Maaz Tariq
Ahmed Maaz Tariq
Maaz Sheeba
Maaz Bin Tariq
Sana Tariq
Maaz Tariq Ahmed
「Maaz Tariq」を検索すると、結果は次の順序で表示されます
Maaz Tariq (highest score)
Maaz Tariq Ahmed (high score)
Ahmed Maaz Tariq (medium score)
Maaz Bin Tariq (lowest score)
Maaz Sheeba (lowest score)
Sana Tariq (lowest score)
どのアナライザーをどのように使用するか教えてもらえますか? 名前の検索結果をランク付けする方法は?