Many years ago I had a problem with medical reports we had written for printing on paper. As we were transitioning from physical records to an electronic database, I needed to transfer several thousand laid-out reports from Adobe InDesign to the database I was building in Claris FileMaker. I discovered I could export the original reports in IDML format, extract individual fields such as patient names and dates of birth, and import those to populate fresh records in FileMaker. Although this went remarkably smoothly, because the main body of the report was unstructured, I was unable to separate the test results each contained. It was another reminder of the limitations of unstructured data.
Perhaps the greatest strength of Apple’s Unified log is that its contents are structured, although most seem to access it through the log command, which discards all structure. To see the difference, compare what you might read in a single entry using log show:
2026-07-06 22:44:00.689232+0100 69455 General error SpotlightServices Spotlight 726 com.apple.SpotlightServices 11610 [SSQueryParser][POMMES][qid=3] Got an empty SPQUParse
with the same entry expressed in JSON:
"date":"2026-07-06 22:44:00.689232+0100",
"activityIdentifier":"69455",
"category":"General",
"level":"error",
"sender":"SpotlightServices",
"process":"Spotlight",
"processIdentifier":"726",
"subsystem":"com.apple.SpotlightServices",
"threadIdentifier":"11610",
"composedMessage":"[SSQueryParser][POMMES][qid=3] Got an empty SPQUParse",
"type":1
where each component is identified separately. This allows you to filter entries according to subsystem, to search for those recorded as errors, and to count how many messages refer to SPQUParse over a given period – none of which can be done with unstructured plain text entries.
If JSON is a little heavyweight and you want to analyse entries using a spreadsheet or database, you could export them in CSV format instead, as that too retains their structure by listing the value of each field in fixed order, separated by commas.
When data is inherently structured, as Unified log entries are, it will normally retain that when being manipulated in an app, using data structures in memory. For LogUI, each of the thousands of log entries it reads and displays consists of a LogEntry structure with fields for the keys listed in the JSON files it writes, every entry being given a unique identity with a UUID. Writing and reading those requires just a few lines of Swift to encode or decode them using built-in functions.
It’s when they’re saved to disk storage that the problems begin for structured data, though. As documents, the app that creates and accesses them can only do so when they’re open in the app. As it has no control over where those files are, it can’t replace Spotlight’s indexing and search without a great deal of additional code, and imposing constraints on where they can be stored. What works well for apps managing their own database (in the singular) becomes impractical for those working with multiple documents containing similar structures.
At the same time, Spotlight has no insight into their data fields, and isn’t intended to store their contents in any structured way. If it were to try to index their contents, it would do so by discarding their structure and storing them using the same unstructured plain text as is generated by log show, much as it already does for HTML and PDF contents.
The same problem has been playing out with standard types of documents containing text, such as Rich Text, HTML and PDF. Early attempts to structure text semantically using the grandfather of markup languages, SGML, were generally supplanted by markup based on appearance and layout rather than semantics, and that’s now the basis for much of the structure in text files. There are some surviving exceptions in Donald Knuth’s TeX and its relatives, the Text Encoding Initiative, and in XML, but even those seem to be falling by the wayside.
Trying to build such marked-up text into structures with meaning is thus futile, so for search purposes all markup is removed to leave plain text content that fails to distinguish chapters, sections, footnotes, bibliographies, or any of the rich structural aids that we see on our displays and in print. Spotlight is unable to look for references containing specific author names, for example, except for the limited metadata that can be saved for each file, but seldom is. Even basic structural features such as headings can’t be distinguished, so there’s no way to look for a book chapter title containing a specified term, for example.
This isn’t confined to Spotlight either. Although a great deal of effort has been put into the indexing and search of plain unstructured text, few systems can make good use of structure where it’s available, and they tend to be narrow in their scope. For everything else we’re stuck with the lowest common denominator, and discarding the rest.
