2006/11/28, Jamie McCracken <<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Adam Lofts wrote:<br>> Hi,<br>><br>> On 28/11/06, *Magnus Bergman* <<a href="mailto:magnus.bergman@observer.net">magnus.bergman@observer.net</a><br>> <mailto:<a href="mailto:magnus.bergman@observer.net">
magnus.bergman@observer.net</a>>> wrote:<br>><br>> Is it only realistic<br>> that users would want (or should be able) to do such simple searches? I<br>> think it's realistic to imagine that there can be different search
<br>> engines which are good at different things. Perhaps one is good at<br>> finding media files by their tags. One that is good at finding relevant<br>> information from fuzzy terms.<br>><br>>
<br>> The multiple search engine problem seems to be the perfect use case for<br>> dbus naming. Each search engine registers a well known unique name e.g.<br>> "org.novel.Beagle.simple" and tries to own "
org.freedesktop.search.simple".<br>><br>> Thus if I want to be picky about who to query I ask for the engine<br>> specific name, and if I don't care (surely the common case) I ask for<br>> the well known name. Wrapping a library around this would be fine, but
<br>> the main point of the spec needs to be defining this interface<br>> ("search.simple") and getting everyone to implement it.<br>><br>> On 28/11/06, *Magnus Bergman* <<a href="mailto:magnus.bergman@observer.net">
magnus.bergman@observer.net</a><br>> <mailto:<a href="mailto:magnus.bergman@observer.net">magnus.bergman@observer.net</a>>> wrote:<br>><br>> At least I see it there has to be some kind of daemon if there is a
<br>> dbus interface.<br>><br>><br>> Use dbus activation.<br>><br>><br><br>thats what I have been saying to mikkel (in private). We really dont<br>need a lib/daemon<br><br>Also I agree with most of what Joe Shaw has said on this thread
<br><br>We should punt query language and metadata names to a later spec and<br>concentrate on getting a very simple implementation going first.<br><br>As for live queries, I dont like dynamic interfaces and in tracker we
<br>will simply take a live_query_id as a param and use dbus signal<br>filtering to listen for changes to that specific ID<br><br>I would suggest having a PrepareQuery method which returns a unique<br>integer for the query then you can use that to :
<br><br>1) Execute the query<br>2) Get the hit count<br>3) listen (using dbus match rules) for specific changes (hit added/removed)<br><br>Its simple and avoids bad practices like dynamically chanigning<br>interfaces (and is no less efficient)
</blockquote><div><br><br>Why is it that you are against a dbus object per query? That way you listen to signal on the object directly and avoid message filtering (and possible flooding of the bus). More over a a dedicated object is also easier to bind in the toolkits (as far as I can see atleast).
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Heres my suggested spec for Wasabi:<br><br>ServiceTypes is an array of service names like "Files", "Emails" etc
<br>need to define full list)<br><br><br>method PrepareQuery (ServiceTypes as, query s) return ID i<br><br>method ExecuteQuery (int ID, offset i, limit i) return as (array of uri's)<br><br>method QueryHitCount (int ID) return i
<br><br><br>signal QueryHitAdd (ID i, uri s)<br>signal QueryHitRemove (ID i, uri s)<br><br>The above is easy to implement and should cover the simple ground</blockquote><div><br><br>Do I understand correctly in that you mean to use this interface directly with no toolkit bindings? (I'm not objecting - just inquiring).
<br><br>What about snippets and file/object properties?<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">For nautilus also needed is extra methods for searching files by mime
<br>types and/or location - these can be separate methods as tracker<br>implements them (mime and location dont have a meaning with non-file<br>entities)</blockquote><div><br><br>What about Konq? Does it have any special needs?
<br></div><br></div><br>Cheers,<br>Mikkel<br>