a fundamental inquiry about tags/metadata + (global) search

dear community,

in short: is there any way - or any script - so one can do a global search for strings across title + content + tags (metadata) – and make DT behave like spotlight in this regard?

currently I can find no way to enter one or more strings and search for their occurrence regardless of whether these strings appear in a title, in the document content or as part of tags (finder tags as well as the ones I attribute within DT).

from my angle tags are an additional information which I can add to documents/content to virtually group them, but also to characterize the content. – if I´d aim at simply grouping documents, I´d fall back onto the DT-inherent groups and (virtual) folders and aliases and such.

I always understood DT as a unique combination of ‘a super-Finder’ (as put in another thread) and a mighty tool for progressive information organization. but recently I noticed how this particular problem consistently drove me to look for supplementary tools to DT just ‘to make up’ for this inability to do an ‘agnostic’ global search across a document and its metadata. originally I thought there is something I overlook or that its a matter of finding ‘ways around’ – but increasingly I am fearing this is a idiosyncracy of DT…

as to the context of use: I am dealing with medium-range and semi-structured collections of documents and information. thus, any potential reference to advanced search and the extra search field for tags/metadata doesn´t really help my case as I am looking onto a stack of documents that might or might not be systematically tagged – and I want to / need to find the string regardless of where it appears.

so my question:
is there any thing I overlook or misunderstand relating to DT (global) search, as it strikes me as odd that DT seems to behave so differently in comparison to Spotlight and most other advanced PIM tools with regards to global search?

– alternatively: is there any way around the standard behavior via some kind of trick (e.g. a script that could move tags automatically to the content section, etc.) that would enable such a global search across content and tags?

thanks for any help, hints or illuminations! :slight_smile:

No, it is currently not possible to do this in the search field. As you mentioned, the only viable way is to create a smart group or use the Advacned button of Tools > Search, to add Tag criteria.

Possible? Possibly, but it would certainly be only applicable to text-based formats, ie. not PDFs, Word docs, etc.

thx Bluefrog for this swift first reaction!

is there a reason for this way of architecture? it seems to be non-standard when I compare it to other tools in the OSX realm (spotlight, other broadly known information mangling apps )…
so, one part of my inquiry (the ‘fundamental’ one) is about understanding the information philosophy behind DT, and find my way in it…
currently it seems to me, this rigid exclusion of metadata from global search defeats – to some extent – the very nature of DT as information-mining tool. so, on this I am trying to understand what the benefits of this are (as there surely is a reason for DT to go this other way in this regard).

on the practical level: yes, I was aware/afraid in the case of this really being the one and only standard behavior that any workaround would bring one up against the problem of rigid document formats and how to auto-apply metadata in a helpful way (for my case). here I am hoping there is some way to still achieve this kind of broader global search via a script or trick… maybe via Spotlight commentaries (?) … or any other route? on this part I am putting my hopes into the most agile (pro-)user community of DT!
– somehow I am reckoning (or hoping) that I can´t be the only one who is reliant of this kind of broader, ‘Spotlight-like’ global search capability.

thx already – … and still hoping!

Fundamentally, DEVONthink is a content-aware application. For example, the AI does not consider filenames or tags when classifying or suggesting other files in See Also. This is by design.

Names are variable and tags are not only variable, but also often inconsistently applied. ("Did I use “rock”, or “stone”, or “pebble”, or… ?) Generally speaking, the content is not only more static, it’s the meat of what you’re searching for. Finding a filename is going to rarely be the end goal. It is a vector in a search for content. You’re likely not trying to find tags themselves, but the content itself.

That being said, we are considering some extensions for future versions of DEVONthink.

Regarding using Spotlight Comments, which would be searchable using the Metadata (and All) search scope, here is a little code (not heavily error-trapped) that adds a file’s tags to its Comments…

-- Add Tags to Spotlight Comments
-- Created by Jim Neumann / BLUEFROG on Tue 06 19 2018.
-- Copyright (c) 2018 BLUEFROG / DEVONtechnologies, LLC. All rights reserved.

tell application id "DNtp"
	set ot to AppleScript's text item delimiters
	set AppleScript's text item delimiters to ", "
	repeat with thisRecord in (selection as list)
		tell thisRecord
			if tags ≠ {} then
				if (comment ≠ "") then
					set comment to (comment & return & (items of (tags as list) as string))
					set comment to (items of (tags as list) as string)
				end if
			end if
		end tell
	end repeat
	set AppleScript's text item delimiters to ot
end tell

thx again, Bluefrog!

very kind to provide the script! I was only guessing what could bring about a global search in the broader way that I conceive. using the script, I became aware that copying tags to the spotlight commentaries field is not… :-/
… so, on this practical part of a workdaround I am still hoping some versatile member of the community that maybe shares this interest in a spotlight-like global search within DT.

thanks also for detailing the thinking behind this search behavior.
I am aware there is a substantial part of the DT-community invested in a certain kind of (historical, juridical etc.) text-research, where text is some integer value in itself. in my case the work with content (as opposed to ‘text’) is more hermeneutical, creative and dynamic. so for me it would be invaluable if there is a way that DT can accept some way of semantic input into documents, making that input part of the document meaning itself. my tags are (partly) a way of inputting ‘content’ that is missing in the explicit text-body of the document but belongs there (this is why I said my tags are ‘characterizing’ the documents/text in some meaningful way for my uses).
to ‘extend’ and augment the original text in this way helps also to link documents content, even if their original body of text doesn´t do this phonemically/lexically.
one case would be two documents in different languages, say english and german, both talking about ‘birds’ but one only uses the lexeme ‘vogel’/‘vögel’.
another case could be looking for receipts, where some documents originally contain the (sub-)heading receipt, others not, and still others carry german ‘quittung’.
… in all these cases it would be helpful to have a global search look at the actual ‘content’ but also in tags as part of content/meaning (where they are possibly already applied) – and not only in the actual ‘text’.
… just to give you some rationale for my inquiry, and where I would see ‘content’ and (characterizing) tags becoming possibly indistinguishable – and a useful augmentation of textual body of documents.

as to the question of systematicity of tags: yes! that is of course a well known problem. I hold DT in high regards for allowing to tackle this via its offer of nested/grouped tags and batch renaming and tag-fusion, which effectively allows for attaining a sort of controlled (tag) vocabulary. actually DT is (potentially) a very good tool containing these ‘drifts’ of tag vocabularies!
and in as much as one still might have different variants/writings of tags – like ‘birds’ and ‘seabirds’ and ‘extinct birds’ etc. – it would still be of huge help to be able to search for ‘birds’ globally … and have all texts coming up whether they are english and containing ‘birds’ or semantical variants/cognates, or whether they are german and happen to be tagged with any of the tags containing bird.
– actually in this way such an inclusion of tags in (global) search might even contribute to a more coherent cultivation of the tags of any database itself! just a thought.

thanks again. and holding my ears further into the community…

… maybe to include tags (metadata) in the global search can be an optional on/off-setting for users?! :slight_smile:

looking forward to see DT evolve.

We are considering syntactical changes that would be available without requiring more preferences.

thx for letting me (and others) know!

lookingforward + best!

You’re welcome. There are many good things coming in the future! :smiley:

I’ve registered this vote before, but if Dt could search for tags from the search-bar it would greatly increase usability for me.

This discussion is clarifying. The way I use tags definitely adds content that’s often not clear in the text. They link things by subject names that may not be in the body. They also pick out subjects that may not stand out in larger texts.

So, yes please, if easy tag-searching is added, my user-satisfaction would go way up.

+1 for this. I often want to search fluidly, using a mixture of tags, metadata, and content. Oftentimes I get fewer hits than I expect. I realize that DTPO’s search philosophy is different than my own, but I would love it if a future enhancement allowed free searching across many fields.

I believe that this is what DTTG currently does, and in fact, sometimes I end up picking up my phone to search, even when sitting at my computer, since it will sometimes find the document I’m looking for when DTPO won’t.

I also noticed this being implemented nicely on DTTG already, and was just about to ask if there are any plans to bring the current DTTG search implementation to DTPO.
Looking forward to what the future might bring!