I have trouble finding files with “#” in their name. Let’s say a file is named “MyFile#”. The search “*#” returns no results. Is “#” a wildcard of sorts? I cannot find anything in the documentation. And, is is possible to use the wildcard * at the beginning of a query?
Only alphanumeric characters will be found.
Is this wanted behaviour? If so, why?
Yes, it’s intended behavior.
DEVONthink’s artificial intelligence procedures are at the core of the database. When a new item is added to a database its text is read, the words in it added to the Concordance, and the database keeps track of the contextual relationships of word usage in every document (the basis of the See Also procedure, which can suggest other items that may be contextually related to the document being viewed). When the user places a new document into a group, the database keeps track of the contextual relationships of the words used in that group (and in every other group in the database, as well), so that the Classify routine can make suggestions about a possible location for a new item.
In most languages, these procedures are faster and more efficient if they are restricted to alphanumeric characters. So, for that matter, are the Search procedures. Note that in DEVONthink searches, “*” and “?” are WildCard characters.
An underlying principle in DEVONthink is that the information content of text in documents is primarily conveyed in strings of alphabetical characters and/or numerical characters. These are the “word” strings that are compiled in the Concordance. Any such “word”, when entered into a Search query, will be found very rapidly. An exact string, a sequence of specific “words” in order is defined in the Search syntax by enclosing them within quotation marks (equivalent to a phrase, but ignoring any punctuation marks, of course).
So, if you wish to enter searchable markers in text documents in a DEVONthink database, a character such as “#” will be ignored by DEVONthink’s Search procedure, just as though it were a Space or a punctuation character such as a period or semicolon. You might use, instead, a “word” of at least 3 characters, such as “mmm” or “zxz”.
Of course, for examining all the characters in an open document, Apple’s Find routine is available, and it can find the “#” character.
xaxa has a good point. The OP request was “finding files with ‘#’ in their name”. Not “finding files with ‘#’ in their content”. Many, many files, IME, have non-alpha characters. Finding file names is not an AI thing - not even sure if the AI proposes see also/classify by examining file names - so why there should there be a restriction on how the toolbar Find or the Search panel works when looking for file names?
Maybe DTech could answer the OP’s actual request?
It’s true that Name metadata – document names – are not considered by Classify and See Also. But it thought it relevant to discuss the Concordance, Search and AI features, as that might help one understand DEVONthink’s approaches to “characters” and “words” – and so why a Search cannot be made for “#”.
Perhaps I got too wrapped up in that.
Anyway, can one find the “#” character used in the Name of a document in DEVONthink?
Sure. If the database has been set to send an index to Spotlight (in Database Properties), do a search in Spotlight and, if necessary, choose the Show All option.
I’m tempted to go on to discuss why Apple’s Find looks at the body of a document but not its filename, and in a related vein why a DT Search query that concatenates terms with the AND operator will return a null result if each term appears solely in only one among Content, Name, and Comments settings and each term is in a different setting – but I’ll slap my wrist and stop. These are part of the same tapestry.