HI,
I have txt file with content of
%ICUDateTime%YYYY-MM-dd HH:mm:ss%
When I try to search for ICU, I get no hits , when I search for %ICU , I do get a hit , I understand some settings with operator might have to be off , any clues?
HI,
I have txt file with content of
%ICUDateTime%YYYY-MM-dd HH:mm:ss%
When I try to search for ICU, I get no hits , when I search for %ICU , I do get a hit , I understand some settings with operator might have to be off , any clues?
%
is an indexed character, therefore %ICU
is the beginning of the word and found if the toolbar search option Partial matches while typing is enabled.
I was able to get the search with ~ICUDate
I’d hazard a guess you’re…
text:
. Search prefixes are generally advisable to be more specific in your queries.text:%ICU*
. This is covered in the Help, in Windows > Main Window > Search Pane…I was able to get the search with ~ICUDate
Yes, because you used the contains search operator.
@prashant was expecting the query ICU
(without %
) to return a result beginning with %ICU
. Partial matches shouldn’t make a difference here, no? Since that only assumes a *
wildcard at the end of the search term… Like you suggest, it’s necessary to adjust the query. (Can be missed if reading too fast)
When you search, DEVONthink doesn’t go through each file individually. To keep search performant, DEVONthink extracts (indexes) information from your database items to a so called “search index”—under the hood, in the internals of the application—and searches that. This is common; Spotlight and Google does the same.
Not all special characters are indexed. You can’t search for those that aren’t. (The manual lists the symbols ‌$€£¥%§
as indexed on p. 88, Windows > Main Window > Search Pane)
If %
was not indexed, the query ICU*
would return %ICU…
because the search would be “blind” to the %
and just see ICU
in the search index. Since %
is indexed, it’s considered the first character in the word.
Maybe a different example makes it clearer. Would you expect a search with just the query ight
to return…
…?
It doesn’t.
As you found out, you can use wildcards. ?ight
, ~ight
and *ight
would return all of the above. Here the only difference is the first letter. If we drop the last letter from the query (and disable Partial matches while typing) we get different results. ~igh
returns the same as before, the others don’t. You’d need to add a wildcard at the end too: ?igh*
or *igh*
It might be useful to look at the examples in the manual under Appendix > Search operators > Wildcards.
Note: some characters are indexed, but normally interpreted as search operators – for example ?
. To include them in search terms, the term must be enclosed in quotation marks: "…?"
If
%
was not indexed, the queryICU*
would return%ICU…
That’s right. %
is indexed, see e.g. Concordance > List inspector to verify this on your own. And that’s why %ICU*
works but ICU*
doesn’t (or similar terms without wildcards if partial matches are enabled).
I didn’t think about checking the concordance inspector when in doubt – nice tip
@troejgaard Thank you for taking time to explain this to me !! It’s much more clear now.
Great tip on Concordance !
I’m glad it makes sense to you!
What makes DEVONthink great is the whole package, so it can be difficult to single out just one feature… But without a doubt, for me DEVONthink’s top feature is the search. It’s simply amazing. You do need to understand some basics to get the most from it though.