Search bug?

Today I examined a somewhat strange search behavior in DTP:
when I search for two words - one is in the file name and not in the content of the file, the other is in the content of the file and not in the file name, the search will not find the document. The issue is reproducable (I had a simple iWork-Pages file).

Any comments? I think the search should find the document, or am I wrong?

Let’s say your two words are “sturm” and “drang”. If you write your search term as “sturm drang”, that is the equivalent of searching for “sturm AND drang”, telling DT to look for documents that have both terms. DT assumes “AND” if no other boolean is declared.

If you want to search for either term, then use “sturm OR drang” as your search term. This will find your two documents. Try it. It works. No bug. WAD.

I think it should too, but it doesn’t. Your query is applied against individual fields - title, content, comments, etc. So when you search for “term1 term2” (without quotes) it will look for a document that has term1 and term2 in the title, or in the content. If you have a document like the following:

Title: This is the title of my document
Content: and this is the content of my document

there is currently no way to search for “title content” and get that document. Your best bet is to assign keywords in the comments, or think of a different query that you can use to find your doc.

My experience is that korm’s comments on the OR operator are spot-on and padillac’s comment on the AND operator is for the most part correct. While it is correct that a basic search on ‘title content’ will not return a document with:

Title: This is the title of my document
Content: and this is the content of my document

It is possible to search for ‘title content’ and get that document without resorting to adding keywords. You can click on the ‘Advanced’ button in the search window and create very simple (or complex) search operators. If you structure the advanced fields as pictured below and leave the actual search field blank. it will return all documents with ‘title’ in the name OR ‘content’ in the document.

Change ‘Any’ to ‘All’, and it will find all documents with the name containing ‘title’ AND the contents of the document contains ‘content’.

I think you all are right - thanks!
But in real life I don´t know all of my file names - if I would, I wouldn´t need a document management system like DEVONthink - and sometimes I only know a few keywords of the document I am searching for.

In my database usually the OR operator returns too many results, so combining two or three keywords with AND (or without any operators in the search field) gives the best results. But in the case of the original posting DTP returned no result at all.

From a logical (not technical) point of view, I think DTP should find the document: in the example above if the search for “title” finds the document and the search for “content” finds the document, then the search for “title content” should find the document, too. But that doesn´t happen.

DEVONthink searches can span Name, Content, Spotlight Comments, etc. If ALL is chosen.

But If terms A, B, and C each occur only within one of those “fields” of a document, a search for A AND B AND C will not return a result. That’s not a bug. In such a case no document exists that meets the search criterion.

If that seems surprising at first glance, think about the point that this actually adds more, rather than less logical power to searches when that behavior is deliberately used. One of the tricks I often use is to replicate or duplicate a set of search results to a new folder, then do further “slicing and dicing” on that set of documents. I might, for example, do the initial search based on document content, then look for a subset for which I had used a particular convention in document Names (or vice versa).

DEVONthink’s principal focus is on Content of documents; indeed, See Also and Classify only consider document content. Names, group locations, Spotlight Comments, etc. are metadata associated with documents. The Concordance of a database includes only those terms that are included in the Contents of documents, and not those that are only present in Names, Spotlight Comments and other metadata elements.