Spotlight App Extension does not persist custom Attributes

We are in the process of updating our legacy Spotlight MDImporter to the new macOS Spotlight App Extension. The transition works well for standard attributes such as title, textContent, and keywords. However, we encounter an issue when adding custom attributes to the CSSearchableItemAttributeSet. These custom attributes are not being persisted, which means they cannot be queried using a Spotlight NSMetadataQuery.

Has anyone an idea on how to append custom attributes so that they are included in the indexed file status, as displayed by the shell command mdimport -t -d3 <path>

A sample project illustrating the problem is available here: https://www.dropbox.com/scl/fi/t8qg51cr1rpwouxdl900b/2024-09-04-Spotlight-extAttr.zip?rlkey=lg6n9060snw7mrz6jsxfdlnfa&dl=1

Hi @berbie,

Could you please submit a report via Feedback Assistant and attach your project there instead? Once submitted, please respond here with your Feedback ID and the CoreSpotlight team and I will begin our investigation. Having the official report will allow all Apple Engineers to access the same information and share our findings with you directly in your Feedback.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Spotlight App Extension does not persist custom Attributes
 
 
Q