Re: Adding filtering API
- From: Iago Toral Quiroga <itoral igalia com>
- To: grilo-list gnome org
- Subject: Re: Adding filtering API
- Date: Thu, 20 Jan 2011 11:00:05 +0100
El jue, 20-01-2011 a las 10:14 +0100, Juan A. Suárez Romero escribió:
> On Thu, 2011-01-20 at 08:46 +0000, Iago Toral wrote:
> > If they are, I would go with a filtering support with the following
> > limits:
> > - Limited filters, filters on random metadata would not be allowed
> > like
> > (bitrate = X). Still it should be easy to extend the list of allowed
> > filters.
> > - No support for grouping operations like this: (artist=X AND
> > album=Y)
> > OR (date-min=Z AND artist=A).
> > - No support for operator precedence (plugin developers would not
> > ensure certain precedence for operators), or we could just force all
> > the
> > operators of one filter to be of the same kind.
> > - No support for operators other than "=", so no filters like (artist
> > >
> > X) or (album != Y)
> >
> > Of course, we could be more flexible than this if we think is worth
> > the
> > effort, so I would like to hear your thoughts on this matter. For
> > example, we can have plugins declare what keys the support for
> > filtering
> > and remove the limited filters restriction (Grilo could check the
> > filters provided by the users and simply remove the parts that are
> > not
> > supported or fail the operation if unsupported keys are used in the
> > filter before passing the filter to the plugin).
> >
>
> My concert is how plugins declare which kind of filtering are they
> supporting. For instance, they should tell which fields they support for
> filtering. But at the same time, they need to specify if they support
> combinations or not.
Or maybe they can just fail with error "filter type not supported" if
they don't. I think most services that support filtering would support
at least the AND case.
> If we found a way of doing it, then I agree providing a filtering
> search, keeping the restrictions you mentioned (supporting only '='
> operation, and the AND combination).
>
> By the way, if finally we go with it, I have a proposal to do it,
> something I thought some time ago, and that would make easier for
> clients and plugins to handle the filtered search.
Let's not talk about how we can implement this yet and focus the
discussion on what we want to support :)
Iago
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]