Simple search API proposal, take 2

Mikkel Kamstrup Erlandsen mikkel.kamstrup at gmail.com
Mon Jan 15 05:10:37 PST 2007


2007/1/12, Fabrice Colin <fabrice.colin at gmail.com>:
>
> On 1/10/07, Mikkel Kamstrup Erlandsen <mikkel.kamstrup at gmail.com> wrote:
> > There has been general good feedback on Magnus proposal, so I updated
> > the wiki: http://wiki.freedesktop.org/wiki/WasabiSearchSimple
> >
> A few questions and comments about this :
>
> - ShowConfiguration
> >       Open a graphical interface for configuring the search tool.
> Is it safe to assume that because this method was called on the session
> bus
> that a graphical display is available ?


No you can't assume that. We could make the method return a string with an
error message. The method would be considered failed if the response != "".
Errors could also arise if you don't have the toolkit installed in which the
config tool was implemented.


- Query
> >       Start a new query.
> I agree with Joe that a method to explicitly release the handle would be
> good.


This seems to be a popular request. I'll add it to the wiki.

- GetHitProperties
> > URIs and snippets are just properties.
> That's fine.
>
> > properties: A list of properties to return. An empty list is a request
> for all
> > properties.
> What properties should be supported by all implementations ? I'd suggest
> at least "title", "size", "uri", "mimetype" and "snippet".


Well, without a metadata spec, we can only say - "return everything you
got".

> response: A map mapping object_identifiers to a maps of property-list of
> > values pairs.
> How is the object_identifier useful to the client application considering
> that
> it's not required as input by any of the API's methods ?


It could be useful in the metadata spec. We always have to look at the
simple api in the context of the live api, and yet-to-come metadata
spec+api.


- concepts
> > This identifier is a string and will not change if the object is "moved"
> > (think: if a file is moved).
> What if the object no longer matches the query after being moved ? e.g. if
> the object matched the query because of its name and it was renamed, or if
> the query included a directory filter and the object was moved to another
> directory...


The simple interface is racy in its very nature. You would have yo use the
live api to pick up such changes in the result set.

Cheers,
Mikkel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/xdg/attachments/20070115/1003915b/attachment.htm 


More information about the xdg mailing list