Re: [Tracker] Indexing removable devices on demand



On 05/16/2012 02:04 PM, Felipe Borges wrote:
Thanks for your answer!

No problem,

On Fri, May 11, 2012 at 2:35 PM, Martyn Russell <martyn lanedo com
<mailto:martyn lanedo com>> wrote:


        I have written this e-mail because I want to hear from you how
        desired
        this feature is and suggestions on how it should be implemented.


    I think it's a good idea.

    Right now a lot of the things people are not happy when it comes to
    the right content being indexed are due to us second guessing
    behaviour from users (e.g. indexing the Downloads/ directory when
    the Linux kernel is stored 20 times there... OR assuming all files
    are in XDG locations recursively / just $HOME one level deep). We
    can't be sure that satisfies all use cases.

    How do you intend to do this? Ask the user if they have content they
    want indexed on the media and then fire off an API call?


Yes. Essentially an user would *Import files* from a device which is
recognized in the application side. That would fire off a call for
something like tracker_miner_fs_add_mount() (or
tracker_miner_fs_add_directory() on the mount root) which would index
this given device.

Interesting OK.

Besides, my mentor has pointed me out that we need to ensure that:

Who is your mentor by-the-way? Anyone I know? :)

  * the mount stops being tracked as soon as applications are not
    interested in results from it anymore

This sounds like updating tracker:available for resources of that mount point in the DB or did you mean that we don't have inotify event monitoring on that location? I presume the former.

We have a mechanism already to remove old mount point data, usually in terms of days not on demand. We would have to disable that for these mount points.

  * that the mount doesn't get automatically indexed the next times it's
    plugged
  * results from that mount should be kept in the database cache
    indefinitely, even after the mount goes away so that we wouldn't
    need to start fresh the next time

Do you suggest any new/better approach?

No, it seems sane enough.

We usually don't keep results in the database indefinitely for removable devices because it can just clutter the DB with not benefit (consider your friend brings their USB device round and you never see it on your machine again, that data is then stored and never used again).

--
Regards,
Martyn

Founder and CEO of Lanedo GmbH.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]