Re: [Tracker] It doesn't index PHP files



On Thu, 2012-10-04 at 14:37 +0100, Martyn Russell wrote:
On 04/10/12 14:08, Adam Tauno Williams wrote:
On Thu, 2012-10-04 at 14:32 +0200, Carlos Garnacho wrote:
I'd like to point out that the mimetype is application/x-php, not
application/php
Ah, my bad.
sudo vi /usr/share/tracker/extract-rules/90-text-generic.rule
cat /usr/share/tracker/extract-rules/90-text-generic.rule
[ExtractorRule]
ModulePath=/usr/lib64/tracker-0.14/extract-modules/libextract-text.so
MimeTypes=text/*;application/x-php;
tracker-control --reindex-mime-type="application/x-php"
Reindexing mime types was successful
touch /home/awilliam/Documents/Development/PHP/jsonRPCClient.php
tracker-control says filesystem miner is idle
tracker-search Vaccaro
What does tracker-extract report when you run it now?

....
Extracting...
  Using /usr/lib64/tracker-0.14/extract-modules/libextract-text.so...
  Starting to read
'file:///home/awilliam/Documents/Development/PHP/jsonRPCClient.php' up
to 1048576 bytes...
  Read 3977 bytes from file, 1044599 bytes remaining until configured
threshold is reached
Done (2 items)
...
SPARQL item:
--
 a nfo:PlainTextDocument ;
         nie:plainTextContent "<?php\n/*\ ......


So that looks promising, but tracker-search still doesn't find the file.

If it doesn't show any full text extraction then it won't find words in 
the files themselves.
Also, is the FTS config the default or did this change?
   e.g. gsettings get org.freedesktop.Tracker.FTS max-words-to-index

gsettings get org.freedesktop.Tracker.FTS max-words-to-index
10000

The FTS settings are what you're interested in to make sure content is 
extracted correctly. If it is, you should see something like this:
$ /usr/libexec/tracker-extract -v 3 -f gtk-web/support.php
Initializing tracker-extract...
...
Extracting...
   Using /usr/lib/tracker-0.14/extract-modules/libextract-text.so...
   Starting to read 'file:///home/martyn/Source/gtk-web/support.php' up 
to 1048576 bytes...
   Read 4802 bytes from file, 1043774 bytes remaining until configured 
threshold is reached
Done (2 items)





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