When Elsaticsearch is configured as a spotlight backend and a share is defined with a path which contains a trailing slash (such as:) ``` [Files] path = /pool/Files/ ``` Elastic search gets queried with a path containing duplicate training slashes, producing no results. An example logged query: ``` { "from": 0, "size": 50, "query": { "bool": { "must": [ ... ], "filter": [ { "prefix": { "path.real": { "value": "/pool/Files//", "boost": 1 } } } ], "boost": 1 } }, "_source": { ... } } ``` While a user could remove the slash from the path, Samba's documentation does not dictate whether or not the path should have a trailing slash. As well, in many solutions where a user does not directly interface with Samba, it may not be possible to remove the offending slash. Samba should tolerate either including or excluding the slash. The path included in the Elasticsearch query should continue to have a single training slash regardless of path format to ensure results are properly filtered. The additional slash is currently hardcoded here https://gitlab.com/samba-team/samba/-/blob/83f4b51175cdaa20039de7e823bc4c6a15893628/source3/rpc_server/mdssvc/mdssvc_es.c#L48