Need help with search relevance settings

Hello! I started getting acquainted with elasticsearch, and had some difficulties with setting up search relevance settings.

analyzer:
'settings' => [
'number_of_shards' => 1,
'number_of_replicas' => 0,
'analysis' => [
'analyzer'=> [
'rebuilt_standard' => [
'tokenizer' => 'standard',
'char_filter' => ['html_strip'],
'filter' => [
'asciifolding',
'lowercase',
'word_delimiter'
]
]
]
]
],

search query:

{
 "sort" : {
   "_score": {"order": "desc"}
 },
   "size" : 5,
 "query": {
   "bool": {
     "must": {
       "match": {
         "name": {
           "query": "Shameless s10e10",
           "operator": "and"
         }
       }
     }
   }
 }
}'

Main problem is that when searching for "Shameless s10e10", queries like "Shameless s10e09", "Shameless s10e07" are also included in the results.

Is it possible to receive exact results only for Shameless s10e10 query? Thanks!

Welcome!

Change your analyzer as the one you are using is most likely breaking your string s10e10 into multiple tokens.
The _analyze API will tell you that.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.