Hightlight Search Terms in Documents?

Is there a way for EF to highlight search terms? This is critical for me. Also I don’t understand the select or the highlight buttons. What do they do and how do you make them work?

Not at present, although if you open a searched-for PDF using Preview it will show the search terms.

The Select button is for when you have a folder or mailbox selected in the records list and you want to reveal and select it in the source list (e.g. to see its contents).

The Highlight button is for when you’re editing a rich text file or a note and you want to add a yellow background to the selected text, to emphasize it.

Thank you Michael. Do you plan to add highlighting of search terms? If so I will buy EF because I like the non-proprietary database and the simplicity of the software.

Yes—I’ve been wanting that myself for a long time, and I hope to be able to get to it soon.

Great. Then I am on board. Thank you.

I see this thread is rather old, and there is highlighting of search terms now, but I have several questions about it:

  1. When I do a phrase search, it highlights every instance of every individual word in the phrase. This is extraordinarily distracting in a phrase like “The time of day when the birds are fed.” It highlights every “the,” “of,” “when,” and “are.” It is a glut of uselessness. Is there any chance to modify this to highlight only the phrase searched?

  2. Could the color be user configurable? Please.

:slight_smile:

Search highlighting has not shipped yet; it’s in the pre-release version that I sent you.

Yes, I think this is pretty standard across applications and Web pages that highlight search results. In general, I think it’s more useful this way, provided that you omit the irrelevant helper words that don’t really narrow the search anyway.

There are also some technical reasons for it to work the way it does. One issue is that a phrase search doesn’t find an exact phrase, but rather a group of words in close proximity, so it’s not totally clear which matches should count as a phrase if EaglerFiler were only highlighting full phrase matches. Second, it would be quite tricky (and perhaps not possible in realtime) for EagleFiler to find phrase “matches” within the document and highlight them.

This is a feature that I plan to add, though I’m not sure when. In any case, the color that ships will be better than the one in the alpha that you have.

Oh. Sorry.

Yes, I think this is pretty standard across applications and Web pages that highlight search results. In general, I think it’s more useful this way, provided that you omit the irrelevant helper words that don’t really narrow the search anyway.

DEVONthink highlights only occurances of the string, not individual instances of every word in the string. I don’t know how, but that’s my experience. I don’t know what kind of documents you have to deal with, but in the documents I have to deal with, it certainly is not “more useful” to have every individual word highlighted in each returned document when searching for a particular string. Omitting the “irrelevant helper words”–as you call them–renders string searching useless in the documents I have to search through; it could return so many hits (with so many highlighted words in each) that I’ll have to turn to something that can search for a string and highlight the string.

That’s the subject I’m trying to discuss. That’s the point. You’re discussing something different and saying it should do. It doesn’t do. But thanks.

Maybe there’s a faster way to do it than I first imagined. I’ll look into it. However, I still think there is a danger of not highlighting some cases that the user would expect to see highlighted. For example, I see that DEVONthink doesn’t highlight phrases across PDF page boundaries. Preview even has trouble finding two words with a linebreak between them. There are a bunch of layout issues with PDFs where I think a bit of sloppiness in the search is a good thing.

Perhaps you could tell me more about the kind of searches that you do. What are you searching for that it matters whether and where an “of” is present? It sounds like you know an exact string that’s in the document. How?

I’m sorry if it sounded like I was telling you what “should” do. I was simply trying to explain my personal experience and that there are some technical issues (particularly with PDFs and Web archives) that make this more complicated than it might seem. Personally, I don’t include helper words in my searches, and I appreciate seeing all the matches. I’d be interested to know if other people would find it useful for EagleFiler to only highlight full matching phrases.

In a large collection of philosophical and religious works, many specific phrases (or sometimes only parts thereof) are well known quotes, but are frequently needed to be found in context, either for the full context or the attribution or both. In many cases, even “key” words in such a given quote could appear many, many times throughout the collection, when all that is being sought is the actual statement being recalled and needed to be found in context.

I’m sorry if it sounded like I was telling you what “should” do. I was simply trying to explain my personal experience and that there are some technical issues (particularly with PDFs and Web archives) that make this more complicated than it might seem.

No offense taken; it just seemed we were talking apples and oranges. And it may well be more complicated than I even can imagine at this juncture. Regrettably, this would seem to be a step backward in the Mac universe, since exact string searches have been around quite a long time. Even in OS 9 an excellent program whose name escapes me (now discontinued, I believe) could search the content of text files for a string and return it in a set amount of context in a list of hits. With the advances we have available under OS X, and the sudden blossoming of “document management” programs, I expected this to be the most fundamental operation available, but it hasn’t worked out that way. (As an aside: one of my greatest frustrations with Spotlight is this exact frailty, at least implemented in any way that a mere mortal can comprehend.)

I do find DEVONthink’s implementation of this particular feature closest to workable for my purposes at the moment, but have other issues with DEVONthink. Which I won’t belabor here.

Denriddy

That makes sense. What kind of files are these?

There’s still software, like BBEdit, that can do this with text files. The problems are that it’s slow to exact-search non-text files, and even with text files it’s much slower than an indexed search. (Also, there’s a usability issue because with an exact search if you don’t get the spacing and punctuation right you won’t find anything.) Anyway, this is a feature I’d eventually like to provide, because there certainly are cases where the precision is worth the tradeoffs.

EagleFiler 1.2 adds this feature, and the color is configurable.

EagleFiler 1.4.4 will highlight just the phrases.

Another aspect of searching that I’d like to see in addition to highlighting is the immediate display of the highlighted word(s) – or the first occurrence – without further steps. As things stand with EF (as far as I can tell), one must either scroll to the highlighted word(s) or place the cursor in the text of the document and do another search with Find. (FWIW, Dthink does manage to display the found text with no further steps.) I’d consider this a great convenience. Would it be difficult to implement?

Thanks

Yes, I’m working on making it auto-scroll to the first match.

A reminder that this feature is much desired. In the interim, I open PDFs flagged by the search, and it is convenient that the search phrase appears in the external application (Skim). However, when performing a phrase search, the search term is copied to Skim with surrounding quotation marks, which Skim considers part of the search term (and therefore fails to find the phrase). A fix whereby the quotation marks are dropped when transferring to Skim would be useful.

The search function is for me one of the most important features in EF, particularly for finding all occurrences of the search string. So…
I may be dreaming, but what would make auto-scroll even better would be a quick and easy way to move to the next highlighted term as well–again, without clicking in the Record Viewer and without, then, invoking the Find dialogue box with Command-F. A fantasy?

You could use Edit > Find > Find Next, which has a keyboard shortcut.

Brilliant.
Thank you.
I’ll look forward to auto-scroll !