Re: New module proposal: tracker



On Fri, 2009-11-06 at 09:28 -0600, Shaun McCance wrote:
> > 
> > Surely apps should ship pre-indexed help files? Or at least do the
> > indexing at install time when installing from tarballs.
> 
> All right.  Is there a suitable open format for that?  

Yes, the format for pre-installed content is Turtle. You have a command-
line tool and a DBus API to instruct tracker-store to import such a
Turtle file.

You can for example in the postinst of a package do this.

Pre-installed content is something we'll also do on Maemo btw.

> We'll need to be able to merge multiple indexes, even in a single
> document. We'll need to be able to generate these indexes
> at build time without introducing insane dependencies.  And
> we'll potentially need to be able to invalidate portions of
> the system-installed index if we override pages.

All possible with tracker-store. Just use either SPARQL UPDATE or Turtle
files to overwrite and fine tune data.

> I'm not wholly opposed to building indexes at build time and
> installing them.  (I am, however, opposed to calling something
> at install time that builds them.)

You can pass a file to tracker-extract using -f, then tracker-extract
will instead of pumping the metadata into tracker-store, print it on
stdout in the form of a SPARQL UPDATE query. 

So ..

Your build environment can use tracker-extract to generate a file with a
bunch of SPARQL UPDATE queries, then you ship those in your package, and
then you execute all the queries concatenated together using a single
SparqlUpdate() DBus call, using "tracker-sparql -u -q $catted" or you do
them one by one using BatchSparqlUpdate followed by BatchSparqlCommit.

All that should work already. Whether the -f option is officially
supported for tracker-extract is another matter. So far we only use this
for development purposes. I guess we can just, yeah, make it official.

I think Martyn made a man-page for tracker-extract that mentions the
command line option. If that's official enough.

> But even then I'd prefer to be able to build off an existing indexing
> system.  I don't have a whole lot of experience with this, and I'd
> rather let people who know what they're doing do what they know.


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be



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