Bug 14649 - Samba Spotlight Issues with Mac OSX
Summary: Samba Spotlight Issues with Mac OSX
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.12.3
Hardware: x64 Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 16:31 UTC by seventhcereal
Modified: 2021-02-23 17:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seventhcereal 2021-02-23 16:31:09 UTC
Integrated Samba (4.12.3) on CentOS with vfs fruit, elastic search + fscrawler.  Searching on my Mac Mojave (10.14.6) appears to be working but the returned results are case-sensitive, despite the case-insensitive flag on kMDItemDisplayName "cdw".  Because of the casing issue, one cannot be confident on obtaining a complete comprehensive search result and makes searching the NFS very cumbersome without console grepping.  A separate issue is that spotlight will not generate thumbnails or report file sizes for search results, but does do so if one is in the directory and not in spotlight search mode.  Should be pretty easy to reproduce with a Mac/Linux setup.  Sample query:

 sl_array_t(#2): {
                sl_array_t(#3): {
                        string: openQueryWithParams:forContext:
                        uint64_t: 0xa1d0
                        uint64_t: 0x6b000020
                }
                sl_dict_t(#44): {
                        string: kMDQueryBatchProgressDelay
                        type: double
                        string: kMDQueryBatchProgressCount
                        uint64_t: 0xc350
                        string: kMDQueryMatchOnlyFinderFiles
                        bool: true
                        string: kMDQueryBatchUpdateDelay
                        type: double
                        string: kMDQueryQoSClass
                        uint64_t: 0x0021
                        string: kMDQueryBatchFirstDelay
                        type: double
                        string: kMDQueryUniqueId
                        uint64_t: 0x1d50000138b
                        string: kMDQueryAllowTranslation
                        bool: true
                        string: _showAllExtensions
                        uint64_t: 0x0001
                        string: kMDAttributeArray
                        sl_array_t(#13): {
                                string: kMDItemLastUsedDate
                                string: kMDItemDisplayName
                                string: kMDItemContentType
                                string: kMDItemKind
                                string: kMDItemFSContentChangeDate
                                string: kMDItemContentCreationDate
                                string: _kMDItemFinderLabel
                                string: _kMDItemGroupId
                                string: kMDItemLogicalSize
                                string: kMDItemDateAdded
                                string: _kMDItemUserTags
                                string: _kMDItemFileName
                                string: kMDItemLastUsedDate
                        }
                        string: _isPrivateStore
                        bool: false
                        string: kMDQueryBatchFirstCount
                        uint64_t: 0x0064
                        string: kMDQueryMatchSupportFiles
                        bool: false
                        string: kMDQueryString
                        string: kMDItemDisplayName=="Active*"cdw
                        string: kMDQueryBatchUpdateCount
                        uint64_t: 0x2710
                     string: kMDScopeArray
                        sl_array_t(#1): {
                                string: /Operations
                        }
                        string: kMDQueryIsInternal
                        bool: false
                        string: _tccFlags
                        uint64_t: 0x0007
                        string: kMDQueryIsLive
                        bool: true
                        string: _allowContacts
                        bool: true
                        string: kMDQueryPID
                        uint64_t: 0x01d5
                        string: kMDQueryFlatScopes
                        bool: false
                }
        }
  }
Comment 1 Ralph Böhme 2021-02-23 17:12:38 UTC
Iirc searching should be case-insensitive in Elasticsearch by default iirc. Samba simply passed on the search after mapping the logic, doing the seach case insensitive has to be done in ES. That's at least how I remember things, ymmv... :)