[GRLUG] gnome tracker issue
Adam Tauno Williams
awilliam at whitemice.org
Thu Oct 4 08:25:13 EDT 2012
On Thu, 2012-10-04 at 07:57 -0400, Eric Beversluis wrote:
> On Thu, 2012-10-04 at 05:31 -0400, Adam Tauno Williams wrote:
> > On Wed, 2012-10-03 at 20:31 -0400, Eric Beversluis wrote:
> > The root the of the issue here is that there is no extractor for PHP
> > file types; in Tracker an extractor exists for each file types and
> > extracts the information from the file [ODT, DOCX, PDF, TXT, etc...] to
> > be added to the index. Extractors correspond to MIME types and the MIME
> > type of a PHP file is, for some queer historical reason,
> > "application/x-php". Whereas Python files have a MIME type of
> > "text/x-python" so if there isn't an extractor for "text/x-python" it
> > falls back to extracting with "text/*". Most code files are treated as
> > text files: "text/x-c", "text/x-c++", "text/x-java", "text/js", etc...
> > But PHP is "application/*" for which there is, obviously, not default
> > extractor.
> > PHP developers, typically, being lower-case-d developers probably aren't
> > going to write an extractor [which would be done in C].
> > You can try telling Tracker's text extractor that it can extract PHP
> > files by editing /usr/share/tracker/extract-rules/90-text-generic.rule
> > and changing the Mimetypes directive from "text/*" to
> > "text/*;application.php;". And then restarting tracker - logging in and
> > out would probably do that. Then just touch the PHP files, when the
> > tracker miner becomes idle again [tracker-control] check one of the PHP
> > files using tracker-info.
> I'm giving that a try.
> Should "text/*;application.php;" be "text/*;application/x-php"?
> Do I have to 'touch' all the .php files to get them to be indexed? Can
> I do that with a wildcard ("touch *php")?
tracker-control --reindex-mime-type="application/php"
That should cause a reindex of all files of the specified MIME type.
Assuming the MIME type pairing works, it should be available once the
miner becomes idle.
More information about the grlug
mailing list