← Back to team overview

ubuntu-appstore-developers team mailing list archive

Re: Recommended results with empty searches

 

On Thu, May 15, 2014 at 10:23 AM, James Tait <james.tait@xxxxxxxxxxxxx>wrote:

> On 15 May 2014 13:37, Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>wrote:
>
>>
>>
>>
>> On Thu, May 15, 2014 at 7:19 AM, Pawel Stolowski <
>> pawel.stolowski@xxxxxxxxxxxxx> wrote:
>>
>>>  On 15.05.2014 12:04, James Tait wrote:
>>>
>>>  Thanks for picking this up, Fabian!
>>>
>>>
>>> On 15 May 2014 00:33, Alejandro J. Cura <alejandro.cura@xxxxxxxxxxxxx>wrote:
>>>
>>>> As I commented earlier, I think this should be part of the
>>>> /api/v1/search endpoint, and that those results should be annotated
>>>> with "related: true", or "category: related" if they belong to the
>>>> recommendations.
>>>> Otherwise we would have to do an extra http call to the server, and we
>>>> are trying to avoid that to keep the scope responsive.
>>>>
>>>
>>>  ​Agreed.  I hadn't realised this was already being worked on, so I
>>> haven't spec'd it in the wiki yet, but I think the recommended packages
>>> should be returned in the normal packages list from /api/v1/search (so in
>>> the top-level list for a raw JSON response, or in the
>>> `["_embedded"​]["clickindex:package"]` list for HAL+JSON) and tagged
>>> appropriately.
>>>
>>>
>> Not sure if this helps, but you could also have a custom rel for the
>> recommended packages, so that you keep
>>
>> _embedded: clickindex:package for the standard package list and
>> _embedded: clickindex:recommended for the recommendations
>>
>
> ​Indeed.  I thought about this, then discarded it because my brain was
> telling me that the recommendations are still package resources, so they
> belong under clickindex:package - essentially, I was thinking of the rel as
> a content type, instead of a relation type.  Considering it as a relation
> type, I actually prefer the separation of matches from recommendations, but
> I'll leave it up to the people who will have to parse the result ​to say
> which is easier to work with!
>
> Thanks, Ricardo!
>
>
Sure thing. In both cases the "content type" would be a package resource,
but the relations make it easier to identify/parse the recommended
packages. I'd only chose this over the alternative if the recommended
packages are not also listed in the default packages list.


> JT
> --
> James Tait, BSc. | https://launchpad.net/~jamestait/
> Software Engineer, Canonical Online Services
> Ubuntu - Linux for human beings | www.ubuntu.com
>

References