Database search like document search

If I search for “garden” in a document, DT finds this. (Just an example)

But if I search for “garden” in the whole database, “partygarden” is not found.

image

Can I set the database search in the same way as the search in the document? Thanks.

1 Like

You have to type * at the start of the search, e.g. *garden to get words that do not start with garden.

I just saw this topic as I was about to create a topic asking about the reasons behind the disparity of search features between the main search and the inspector search. I find it very confusing, here is one example of the confusion. I have another one: you can search without diacritics in the main search, but not in the inspector search. When you want to search a single file without diacritics, it is somewhat frustrating to know that it is possible but you will have to search the whole database for that.

Different algorithms. The database search uses the index, and your query is probably (implicitly) “garden*” (have a look at the details below the search field). So, you’re looking for “garden” followed by anything (or anything beginning with “garden”). But the document search does not use the index, instead it most likely relies on Apple’s framework or some other technology.

Use “*garden*” to find all occurrences of the word. Use “*garden” if you want it only at the end of words and “garden*” if you want it only at the beginning of words.

@chrillek is spot on here.

However, @cgrunenberg: Partial matches while typing should assume a wildcard at the end of the last search term, so garden should match as garden* and match gardenparty, but it’s not. It’s requiring typing the *.

While typing but not after pressing return/enter.

To come back to the original question. Which setting do I have to select here to have the same behavior?

1 Like

Indeed.

Or in other words: Could you add a setting that produces the same search behavior? That would be nice.

If you want to match both words, then put * before and after the search term, e.g., garden.

@BLUEFROG Yes, I know. But that’s impractical. It assumes that I know before searching that there could be something before and after “garden”. That’s why an option that includes such cases without * would be much better. Could you consider adding such an option?

1 Like

That’s something development would have to assess and consider. But the request is noted.

1 Like

Unfortunately, DT’s search function cannot be set so that (all) word components are also found. (I hope at the moment :wink:). To do this, you would have to enter a * before and after each word. This is too cumbersome for me.

Fortunately, there is a quite good solution for BetterTouchTool (BTT) and Keyboard Maestro (KM) users.

Every word entered in the DT search field is converted after “space”.

So, I type this the way I always type it

image

And get this

image

Solution with BTT: This is the macro

And this is the script for the transformation of the text:

async (clipboardContentString) => {
return “" + clipboardContentString + "
}

The trigger is a key sequence with “space” in a “Conditional Activation Group”. The macro is only triggered if the cursor is in the DT field with the name “AXSearchField”. In all other fields, “space” does what it always does.

This is not perfect. But it is better and much faster than typing the * every time. But I hope that the developers of DT will add a setting that does this automatically. It would be good for DT’s search function. :slightly_smiling_face: