4

As far as I understand, the gnome search, and maybe also the nautilus search, is driven or at least extended by tracker. I installed tracker in 18.04 to gather the content file search functionality I used in Ubuntu 17.10. I was able to add my folders in gnome-settings then, and they are indeed being scanned. But it only seems to use metadata like the name, not the files content:

~> tracker daemon -w
Ressourcen-Aktualisierungen der Datenbank werden nun überwacht
Alle Eigenschafte »nie:plainTextContent« werden ausgelassen

Drücken Sie Strg+C zum Anhalten

The second line says that the Properties "nie:plainTextContent" is being skipped. I think what I want is to enable this, right? I tried to find a way, but I did only find outdated information when searching on the web and I could not find out myself how to enable this property.

The thing is, it seems to only skip nie:plainTextContent when indexing. A manual extraction gives the requested properties:

~> tracker extract ~/watched_folder/file.pdf 
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .

<file:///home/user/watched_folder/file.pdf> nfo:pageCount 51 ;
  nie:title "Lecture_File" ;
  a nfo:PaginatedTextDocument ;
  nie:plainTextContent "long text from the pdf" # this is what I want to search in!

The Question

Do you know how I can enable file content search for the Gnome Overview Search and/or the nautilus search? Is the nautilus search and the gnome shell search (typing in the "Activities" menu) both driven by tracker?

  • I'm not sure will it solve you problem or not. But in such cases I use Adobe Acrobat search in PDF files functionality (see this question and my answer to it). It does not require indexing. – N0rbert Jul 15 '18 at 19:00
  • 3
    I have very bad experience with Adobe products on linux regarding stability and performance, so I'd like to avoid that. Especially because there is a solution (tracker) I already have integrated in the system that has the functionality and perfectly fitted into my workflow. But thanks for pointing to this alternative. – verpfeilt Jul 16 '18 at 9:46
  • As an aside, if you're searching documents contents frequently, may I recommend DocFetcher for this purpose? – S.R. Jul 25 '18 at 10:55
1

It's a bug in Nautilus, it seems. See this issue and the answers to it:

https://gitlab.gnome.org/GNOME/nautilus/issues/624

I see why this does not happen in nautilus code. Its shell search provider does implicitly resort to the "simple" mode, in which only filenames are matched. (https://gitlab.gnome.org/GNOME/nautilus/issues/624#note_311228)

| improve this answer | |
0

Gnome Shell search relies on nautilus search to retrieve files. Without tracker installed, search is restricted to a file name search. With tracker installed, contents of the file can be searched.

In Ubuntu 17.10 and 18.04, Tracker is not installed. File name search would not retrieve files from subfolders in the home folder in Ubuntu 17.10 and early Ubuntu 18.04. Currently, this works well.

I doubt how well file content search will work with Tracker installed. In principle, it should work well. I suggest you just try how well it works.

| improve this answer | |
  • I believe you misunderstood something: On 17.10, I installed tracker and it scanned the folders properly. I then used nautilus or gnome search (I'm not sure if both worked) to search within files, and it worked. It does not work like this on 18.04 though. You suggest to give tracker a try, but that's what I am asking for: How? It doesn't work as I thought/experienced before. I can't figure out how I can configure it to store the nie:plainTextContent property, which I think is the problem. – verpfeilt Jul 18 '18 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.