Hello, could someone kindly tell me how to get 2 occurrences AT THE SAME TIME? I use the AND combination, but I always get the two separate occurrences in the search set, whereas I only want to get the two AT THE SAME TIME. Thank you very much in advance.
An image might help. I donât understand what youâre after.
Hello dear friend, thank you for your quick response to my question. In fact, for example, if I want to search my database for a reference that contains two keywords AT THE SAME TIME, I request the search for the 1st keyword and then add the 2nd keyword, separating them with the AND operator. My problem is that I donât necessarily get both at the same time, as Iâd like.
Clearly, I want to get the 2 occurrences at the same time, i.e. associated (only, but not separated).
You should use the NEXT
operator in this case. See the âSearch operatorsâ section of DTâs manual or built-in help for reference.
Hereâs an example. Iâm looking for the following 2 occurrences at the same time: âAtrial fibrillationâ. I get both but they are not systematically associated as I would like. See the screenshot
Does âsystematically associatedâ mean âthe words should be next to each otherâ (âatrial fibrillation
â), then use the NEXT
operator, as suggested by @meowky.
If you use AND
, DT will give you all documents containing both words somewhere.
The documentationâs chapter on âSearch operatorsâ and âSearch prefixesâ contains detailed explanations and examples.
As @meowky suggests, have a look at the manual. You can also ask for âword1 NEAR word2â and specify how far apart to look. From appendix - search operators:
- term1 NEAR term2: term1 occurs 10 words or less before or after term2
- term1 NEAR/n term2: term1 occurs n or less words before or after term2
- term1 BEFORE term2: term1 occurs before term2
- term1 BEFORE/n term2: term1 occurs n or less words before term2
- term1 NEXT term2: term1 occurs right before term2 (shortcut for BEFORE/1)
- term1 NEXT/n term2: term1 occurs n or less words before term2 (synonym for BEFORE/n)
- term1 AFTER term2: term1 occurs after term2
- term1 AFTER/n term2: term1 occurs n or less words after term2
I canât thank you enough for all your help with this amazing Devonthink tool. Youâve been such a great support! Iâll absolutely follow your advice to the dot, thank you so much! Wishing you all the very best day!
You should quote the search string exactly as you have it here: "atrial fibrillation"
and use the text:
search prefix if youâre searching for content-based matches.
Thanks so much, BLUEFROG! Iâm really sorry, but I donât quite understand what you mean. On the other hand, I found that by separating the two occurrences with ânear,â it worked perfectly as I wanted. I really appreciate your comment, thank you so much!
As mentioned in the Search Operators section of the manual, if you are looking for specific phrase, you should quote it.
And if youâre looking for contents in a document, you should use the text:
search prefix, e.g., text: "atrial fibrillation
.
The OP apparently was looking for âatrial fibrillationâ as a combined term. So, the solution by @BLUEFROG fits the bill, no NEAR
needed.