Have patch, need bugnumber.
There are two issues in mdssvc: 1. The client Spotlight search is per share and mdssvc maps this to a specific Elasticsearch filter based on the absolute path prefix of the smb.conf share. The way this is currently implemented has two flaws: the filter is not anchored at the beginning at the string and it doesn't correctly differentiate between /foo/bar and /foo/bar2 as the filter used is /foo/bar which matches both. To get filter behaviour similar to a regex "^" anchor, we have to use a prefix filter and ensure the filter path has a trailing slash. 2. mdssvc maps the Spotlight wildcard attribute match query ("*") to also search in all attributes in ES which might run into an ES limit if more attributes are available then a configurable maximum. As a better sensible default when mapping from Spotlight "*", we now use a confiruble list of fields which defaults to ["file.filename", "content"].
This bug was referenced in samba master: a8791c0cad4fb03606ea484c2da7ee69d9de5d48 594eb4eb0eb4a6c87c5b136106afd05357b80e91 2b5cbb955ab2cf278272aa8457a672aa27ff1020
Created attachment 18756 [details] Patch for 4.22 and 4.23 cherry-picked from master
Pushed to autobuild-v4-{23,22}-test.
This bug was referenced in samba v4-23-test: e554174d6b38b968c31569536ef4f641fbd3b855 39d2fcb240159521f8a88f2c112e752c798fa708 76257068f6e64186114703f5337d0a70c94d942c
This bug was referenced in samba v4-22-test: e48cbfa16ed8faf67df1e8f053b8356e6d67c287 daf79bd15b3bdd2355200ad0d5b9763fcd6d14cb 6a306f8d3bffdb62e6da4a3b5bb921dccad068aa
Closing out bug report. Thanks!
This bug was referenced in samba v4-22-stable (Release samba-4.22.6): e48cbfa16ed8faf67df1e8f053b8356e6d67c287 daf79bd15b3bdd2355200ad0d5b9763fcd6d14cb 6a306f8d3bffdb62e6da4a3b5bb921dccad068aa
This bug was referenced in samba v4-23-stable (Release samba-4.23.3): e554174d6b38b968c31569536ef4f641fbd3b855 39d2fcb240159521f8a88f2c112e752c798fa708 76257068f6e64186114703f5337d0a70c94d942c