How to Search All?

@BLUEFROG Any chance this might still happen? Thought it might appear in DTP3, but…

Thanks!

There are no current plans to implement a separate search window in DEVONthink 3.

That’s disappointing. Why??

1 Like

As I mentioned previously…

That’s too bad. I recall and understand the reasoning, but it also seemed that there were several other DTP users who agreed that we’d all benefit from a stand alone search window. I hope DTP development might reconsider. Thanks.

I like how it is now and recommend not making it a priority to change.

Came across this thread. +1 to please offer an option for those who prefer to search all databases by default. Thanks.

1 Like

-1 I disagree with this request.

3 Likes

I also disagree with this request. I put things in different databases because they are separate. I can understand others might structure things differently, but a default of searching all databases would drive me up the wall.

2 Likes

Well, maybe rather than having a default it would be nice to have an option under preferences that would allow users to have Search All in a separate window. That seems like a perfectly reasonable compromise.

For anyone reading this and having the same question: I wanted to have the default search be over all databases (which I use most) but couldn’t find the setting for this. I now read that there is no setting for this so I use a quick workaround (I use Keyboard Maestro but there probably are more tools which can offer this). I made a macro that will use the menu item “Find in database (command shift F)” and then paste "scope:all’ which will search in all databases.

See Settings > General > General > Search Scope

2 Likes

The last post in this thread was 4 years ago :wink: I don’t remember when when this was implemented, but it feels like a long time ago.

It’s always a good idea to look in the manual. DEVONthink’s search inspector works very well with the PDF version:

And if you want a separate search window like OP, I find the default keyboard shortcuts very fast: Cmd-Opt-N, Cmd-Opt-F. You only need to lift one finger.

But if that doesn’t satisfy you, you can use AppleScript…

This example gives you a dialog for entering a query. The dialog has buttons for “all databases” (default) and “current database”. Continue by pressing enter unless you want to search the current database. The search opens in a new window.

tell application id "DNtp"
	-- Dialog buttons
	set {btnAll, btnDB, btnCancel} to {"All databases", (name of current database), "Cancel"}
	
	-- Enter Query (Dialog)
	set userInput to display dialog "Query:" default answer ¬
		"" buttons {btnCancel, btnDB, btnAll} default button btnAll cancel button btnCancel ¬
		with title "Search (New Window)" giving up after 300
	
	if button returned of userInput = btnAll then
		set theQuery to (text returned of userInput) & " scope:all"
	else if button returned of userInput = btnDB then
		if (current database) = inbox then
			set theQuery to (text returned of userInput) & " scope:inbox"
		else
			set theQuery to (text returned of userInput) & " scope:" & btnDB
		end if
	else if button returned of userInput = btnCancel then
		return
	end if
	
	-- Open search in new window
	set theWindow to open window for record (root of current database) with force
	set search query of theWindow to theQuery

end tell
1 Like

In DEVONthink 4, hold the Option-Control keys and 1 through 4 to jump through the search scopes.

3 Likes

Very nice!! :smiley:

(I don’t really feel a need for the script myself, I just wrote it as a little exercise.)

@cgrunenberg @troejgaard @BLUEFROG

Mean I feel so stupid :face_with_peeking_eye: that was easy, thanks guys!

1 Like

DEVONthink has quite a few options, it’s easy to miss the right one. But people still request more of them :wink: