Advantages and disadvantages of IndexRawMarkdownSource

I am thinking about switching the hidden preference IndexRawMarkdownSource on.

The doco says this indexes the Markdown source instead of the rendered (HTML?) view. What are the practical ramifications when I switch?

  1. Are bold text snippets like *myword* and code snippets like `myword` still be found with the search term “myword”?

  2. Plus, what do I need to do after changing the preference? Spotlight index rebuild? Or Database rebuild?

Thanks a lot for clarifications!

The whole source will be indexed and therefore e.g. unsupported metadata, HTML code etc. too. And the database will either rebuilding afterwards or you’ll have to reimport the documents.

Thanks. Interesting!

You refer to HTML codes manually written in the Markdown document? There shouldn’t be that many.

So do I understand it correctly that without rebuilding the database the changed preference applies to newly added documents only?

That’s right.

@cgrunenberg I’m considering this too - when enabling this, willl someting in Markdown sources as This is a *bold* text still be found if searching for bold text?

That’s a poor example as bold text is part of the rendered view so of course searching would find the document.

You don’t index the raw source unless you are looking for items that aren’t rendered, e.g., MultiMarkdown metadata, item links, etc.

It at least makes it clear for me, because I wasn’t sure if indexing the raw source would mean not indexing the rendered view (superseding the rendered view with raw source), but it does I gather from your answer so that’s great :slight_smile:

The toolbar search should find it and the Search inspector in the rendered view likewise. While editing you have to enable the operators & wildcards option in the inspector though, otherwise it’s a plain substring search like in most text editors.