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?

verpfeilt
  • 2,962

2 Answers2

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)

verpfeilt
  • 2,962
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.

vanadium
  • 97,564