Gnome Nautilus - How to add directory to the index so it can be "starred"

I'm trying to take advantage of the starring option in Nautilus. But it seems like there is a Bug which doesn't allow to "star" no indexed directories.

How do I add a directory to the index?

screenshot "stared" directories

Note 1: right now it seems like I can only star directories in the first level of the Users folder as well as in the default folders like Desktop, Documents, Downloads etc.
Note 2: the way starring how it worked in Ubuntu 19.04 seems not work anymore.


Solution 1:

Nautilus uses Tracker to index the files in the system. We can use tracker command to add new files or directory.

tracker index --help

NAME
       tracker-index - List, pause, resume and command data miners indexing content

SYNOPSIS
       tracker index --reindex-mime-type <mime1> [[-m [mime2]] ...]
       tracker index --file <file1> [[file2] ...]
       tracker index --import <file1> [[file2] ...]
       tracker index --backup <file> | --restore <file>

Check current indexed folders and files:

tracker status

Currently indexed: 373 files, 49 folders
Remaining space on database partition: 234.0 GB (55.50%)
All data miners are idle, indexing complete

For instance if you want to index this additional folder /home/user/newfolder

tracker index --file /home/user/newfolder

# Confirm that the new folder has been indexed.
# Should output more files and folders than before.
tracker status