Searching using aliases

Hi

I have quite a lot of documents that use American spelling. As an example, I have a document called: “Windows Modernization”.

If I search for “Windows Modernisation” (UK Spelling), that document doesn’t get found. So I added an alias to the doc with the UK spelling.

Now, if I search for this, then it shows up:

aliases==Windows Modernisation

but if I just search for:

Windows Modernisation

… then it doesn’t. Is that the expected behaviour? Usually I’ll not remember whether this was UK or US spelling, so by default I’ll want it to search for aliases and main titles. I don’t want to have to type a complex search but would like it to be the default.

On a side-note; is there anything else I can do here to make searching better? Some apps have a “sounds like” mode. I know that there is fuzzy search here, and perhaps that works for some cases.

On a side note; my experience with Fuzzy Search is really weird. Here’s what happens when I use it:

It looks like it doesn’t take effect for live searching. The document disappears as soon as I type the ‘s’. However, at the end of this screencast you’ll see I hit return, and then it does seem to take effect and the document appears again. Is that expected?

2021-07-20 16.29.28

Aliases are usually only intended for Wiki linking and tagging but are not indexed and therefore not supported by a simple search. An alternative would be to add such synonyms to e.g. the comments or custom metadata.

Another possibility is to search for Windows Moderni?ation or Windows Moderni[sz]ation.

1 Like

I’d suggest using the Fuzzy searching and committing the search with a Return.

@cgrunenberg:
Just a note the Fuzzy doesn’t apply when wilcards are used. So text:windows NEAR modernis* doesn’t find both documents.

Also, fuzzy matches with the two documents aren’t made until text:windows NEAR modernisati* is typed.
Not sure if that’s expected.

May be one day … regular expressions everywhere, as an option? A guy can hope, can’t he?
Then “theat(re|er)” and “behaviou?r” would be possible, too. Or even “(chips|crisps)” :wink:

That works actually already and…

…this too, it’s identical to chips OR crisps :slight_smile:

I thought so. It’s like “write your script in AppleScript” when someone knows JS and is happy with it :wink:

Given that there’s a RE lib already somewhere in DT, it would be nice if those who want could use it in more places. And of course, the RE’y way to say chips OR crips would be c[rh]ips. I was just lazy. Not to speak of things like (thea|cen|me)t(re|er), to get back to the original question.

Thanks for all the help. That’s useful! I think typing wildards, or ranges, is probably not something I’ll do for every search. Although it’s possible, it definitely slows things down and requires a bit of thought, and knowledge of how words are spelt in US versus UK English, for example. Not great for a quick search.

Can I make a feature request, that you add aliases to the data that’s searched by default? They may only be intended for Wiki style linking. But even so, it’s a very prominent field, and would save double entry. If they’re not searched by default, I’d have to enter all my aliases a a second time in the finder comment field, just in case I ever need to search for that file — which is clunky and slows things down.

I’d have to enter all my aliases a a second time in the finder comment field, just in case I ever need to search for that file — which is clunky and slows things down.

No you don’t. There’s already a search prefix for this…

aliases==aliased -- is exactly "aliases"
aliases:<Windows -- Begins with "Windows"
etc.

Though, perhaps aliases could use the matches operator too, @cgrunenberg, e.g.,…

aliases:windows behavio*r

Aliases aren’t indexed and therefore don’t support this currently.

But I do hundreds of searches a day — wouldn’t the above need me to enter that each time I search? I really just want to do a quick search — for example, type “Modernisation” into the search, and have it return all docs with that title (or alias). If I have to type something like:

any: aliases:~Modernisation docTitle:Modernisation

… Which is a lot of typing just to do a simple search, and involves typing the actual search term twice.

Is that what you mean, or am I missing something?

If you just searched for Modernisation, it would include tags, content, urls, etc. so if you’re searching specifically for titles or an alias, you’d need to be entering explicit search prefixes anyways.

I’m curious why you’re “doing hundreds of searches a day”. What’s your use case?

In the example of searching just for Modernisation. Yes! That’s exactly what I want to do. This will find any file called “Modernisation” - which finds all the relevant files, as long as I spelt them with UK English.

What it doesn’t do, though, is find “Modernization”. From the discussion above, I think you’re saying that to do this, I could construct a search query like this:

Windows Moderni[sz]ation

I could do; but if I’m on a call and wanting to find something quickly, it’s unlikely that I’ll put together a complex search string. In reality, I’ve started using tools like Alfred instead (or sometimes Houdaspot). But if I’m using those, it’s tricky to switch back to using DT. if DT optimsed for search I think I’d like to mainly use DT for working with these files.

Re: a use case that involves searching for many files… It’s just that’s how I interact with files. I mainly use DevonThink search to find any file I’m working on. I am just very used to searching first rather than drilling down into specific hierarchies of files. So any time I open a file, it’s very likely I’ll have searched for it in order to reach it, and I potentially will open hundreds of files over the course of a day. Any solution I use needs to be optimised for good searching.

Really good example of this is Google’s Gmail, where typically you’d search for something and it’ll find it almost instantly - rather than categorising your email into hundreds of folders and relying on perfect filing.

I work on a shared drive with tens of thousands of files. And though there’s a hierarchy, it’s not always the case that someone has filed it absolutely perfectly. Searching for the file saves loads of time.

Tom

It would probably be possible to write a script that builds the query. As I’m no native english speaker I have no idea how complex this would be. If you put some thought into what needs to be replaced (i.e. provide a list of replacements) I could try to write such a script.

Fuzzy matching finds both spellings of modernization I’d say that’s your easiest option to pursue if you’re not going to use wildcards…

1 Like

You can make that arbitrarily complex :slight_smile: Given that Britons call chips fries and Americans call crisps chips… Not to mention theater/theatre, center/centre, all these s/z thingies like rationalis/zation, and the case of the lost u in behavio(u)r, neighbo(u)r… And then there might be subtle differences between bathroom and restroom :frowning:

It’s like searching for “Blumenkohl” and “Johannisbeeren” in Austrian recipes, when they call it “Karfiol” and “Riebiseln” (I’m not sure about the spelling here).

1 Like

It is correct fuzzy matching won’t match colloquialisms, idioms, etc., e.g., typing flashlight won’t also match torch.
However, subtle variants like the s/z difference. However, it will not distinguish between theater and theatre. @cgrunenberg would have to comment on the feasibility if that.

Actually I only meant these :slight_smile:

Cool; thanks!

Fuzzy search works pretty well for this.

There’s just this really weird bug, which I think was making it look like it was not working before. Fuzzy search only kicks in once I hit a space after the last word (or return). So if I search for (without the quotes):

“Modernisation Programme”

Then I don’t get “Modernization Program” in the results. I only get exact search. Even if fuzzy is ticked.

As soon as I hit the space - e.g. "Modernisation Programme ", the fuzzy results appear.

This does feel like a bug (or it’s very weird, if it’s expected behaviour). I suspect it’s because the “live searching” doesn’t honour the fuzzy flag; but if you hit return or space it somehow does something different and honours the fuzzy flag.

No problem.

Without Partial matches while typing: I’m seeing fuzzy matches after type modernisati.
@cgrunenberg would have to comment on that behavior as perhaps there’s a threshold of characters required for fuzzy matching.

With partial matches, there is an assumed wildcard at the end of the last term, so it’s likely the fuzzy matching isn’t invoked until the word is completed.