simple search api (was Re: mimetype standardisation by testsets)

Jean-Francois Dockes jean-francois.dockes at
Sun Nov 26 19:17:09 EET 2006

Jos van den Oever writes:
 > 2006/11/26, Jean-Francois Dockes <jean-francois.dockes at>:
 > >  1- A need for trivial enabling of text search in any (non-search)
 > >     application, with minimal fuss, (better described by Fabrice in the
 > >     quoted message).
 > For this, we also need a way to search in documents that have not been
 > indexed. Indexes can take up a lot of space and the user might not
 > want to have an index of all her data, but still want to search that
 > data now and then.
 > Since searching in this way is a lot slower, there would need to be a
 > more asynchroneous method of reporting the search results.

I'm not a d-bus expert, but at least with the qt4 bindings, it seems that
you have a choice of waiting for the reply to a d-bus message, or be called
later when it arrives. There doesn't seem to be anything inherently
synchronous in d-bus, so I would imagine that other bindings or adaptors
have similar capabilities. (One could imagine horrible hacks with Query()
and CountHits() too, like specify a zero count to Query() to make it
return immediately). Or threads.

 > Also, what to do if the user searches for a property that has not been
 > indexed? E.g. suppose no titles have been indexed. This would mean
 > that the search engine should fall back to scanning the files.

I have a hard time figuring out why we should bother that much with users
who don't want to index their data ? find, xargs and grep be their friends :)
Anyway, if the search engine wants to go scanning, what's to prevent it ? 


More information about the xdg mailing list