On 11/19/21 13:07, Perttu Aaltonen via samba wrote:> I?m testing Spotlight with Elasticsearch + fscrawler on Samba 4.14 > and it?s mostly working fine. But I?d like to deal with these: > > 1. Sometimes typing something in the Mac Finder window?s top right > corner doesn?t work. Either by itself or selecting ?name matches:?. > In the log I see this: > > [2021/11/19 11:17:08.663810, 0] > ../../source3/rpc_server/mdssvc/es_mapping.c:182(es_map_sl_attr) > es_map_sl_attr: No JSON type mapping for [kMDItemAuthorAddresses] > [2021/11/19 11:17:08.664252, 0] > ../../source3/rpc_server/mdssvc/mdssvc.c:973(slrpc_open_query) > slrpc_open_query: backend search_start failedlatest version has elasticsearch:ignore unknown attribute = yes | no and elasticsearch:ignore unknown type = yes | no Cf man smb.conf.> It might work later so it?s not always consistent. Using the same > search term in the more granular search section with either ?contents > contains? or ?name contains? works every time. > > 2. Searching by file name is case-sensitive. I?m not sure how and > where to tweak it so Samba would return results with any case. Has > anyone done this modification?hm, I don't remember off hand, but I guess this depends on how the indexer configures the indexes. -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20211119/8922f40b/OpenPGP_signature.sig>
> On 19 Nov 2021, at 14.20, Ralph Boehme via samba <samba at lists.samba.org> wrote: > > On 11/19/21 13:07, Perttu Aaltonen via samba wrote: >> I?m testing Spotlight with Elasticsearch + fscrawler on Samba 4.14 >> and it?s mostly working fine. But I?d like to deal with these: >> 1. Sometimes typing something in the Mac Finder window?s top right >> corner doesn?t work. Either by itself or selecting ?name matches:?. >> In the log I see this: >> [2021/11/19 11:17:08.663810, 0] >> ../../source3/rpc_server/mdssvc/es_mapping.c:182(es_map_sl_attr) es_map_sl_attr: No JSON type mapping for [kMDItemAuthorAddresses] [2021/11/19 11:17:08.664252, 0] >> ../../source3/rpc_server/mdssvc/mdssvc.c:973(slrpc_open_query) slrpc_open_query: backend search_start failed > > latest version has > > elasticsearch:ignore unknown attribute = yes | no > > and > > elasticsearch:ignore unknown type = yes | no > > Cf man smb.conf. > >> It might work later so it?s not always consistent. Using the same >> search term in the more granular search section with either ?contents >> contains? or ?name contains? works every time. >> 2. Searching by file name is case-sensitive. I?m not sure how and >> where to tweak it so Samba would return results with any case. Has >> anyone done this modification? > > hm, I don't remember off hand, but I guess this depends on how the indexer configures the indexes. > > -slow >Hi Ralph, I can?t see those options in 4.15.2 man page. -Perttu
> On 19 Nov 2021, at 14.20, Ralph Boehme via samba <samba at lists.samba.org> wrote: > >> 2. Searching by file name is case-sensitive. I?m not sure how and >> where to tweak it so Samba would return results with any case. Has >> anyone done this modification? > > hm, I don't remember off hand, but I guess this depends on how the indexer configures the indexes.For anyone finding this thread later, you need to modify fscrawler?s default mapping file ?_settings.json?. Add this to the analysis section: "normalizer": { "useLowercase": { "type": "custom", "filter": [ "lowercase" ] } } And this to ?filename? under mappings: "normalizer": ?useLowercase" Now searches by name are case-insensitive. You have to destroy the index and start over though. -Perttu