Re: Opinions on multi-source search



On Thu, 03 Jun 2010 09:14:01 +0200, "Juan A. Suarez Romero"
<jasuarez igalia com> wrote:
> On Wed, 2010-06-02 at 10:59 +0200, Iago Toral wrote:
>> find attached a set of patches with an implementation of this, let me
>> know what 
>> you think.
>> 
> 
> 
> Some issues:
> 
> * patch 0003:
>   - it contains trailing whitespaces (fixed in patch 0007)
>   - I would like to see a multiple_search() api as similar as
> single_search() one. For instance, 'skip' parameter has been removed.

There is a reason for this. Since we are merging results from various different 
sources and we cannot ensure the order of them (at least not if we want to have 
a quick response time and we want to have results from various sources), we 
cannot have this parameter because results have no order.

If we wanted to have a skip parameter we would have to redefine the behaviour 
of this API, for example serializing the queries to the sources but then there 
are other problems to solve...

And now that I think about it, if I change the implementation to follow your 
previous suggestion and ask "count" items to each searchable source then we 
have the risk that the first source providing results provides all 100 items 
before the others (not strange at all) and  I would really like to avoid that, 
we should really try to get results from various sources. Maybe we could use 
the flags parameter to define various search policies.

>   - This complain is quite picky, so ignore it if you don't like ;):
> grl_multiple_search() sounds like performing search for multiple text
> words. Something like grl_media_source_search_all() would sound better
> for me.

The reason I did not use a name like this is that this API is not a method of 
the GrlMediaSource object and thus, I would find this naming misleading, but 
I don't have a strong opinion. What do others think?

Iago


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