[Developers] image_thumb vs. /common/topic/image query
Alec Flett
alecf at metaweb.com
Fri Jun 26 18:25:55 UTC 2009
On Jun 26, 2009, at 10:35 AM, Jack Alves wrote:
> How does the image_thumb service select which topic to display. It
> seems to return the same image that is shown in the freebase.com
> topic page.
>
You're right that it uses "sort": "index" to find the image. If the
images aren't sorted, the results of image_thumb are somewhat
undefined, so results may change. I'm not sure what the proper sort
would be, if there is no index.
We could try to sort by link timestamp, but its unclear (at least to
me) even which direction - the latest one, or the first one? The
latest one gives us freshness, but the first one might be more
'definitive'
Personally I'd say go for "sort": "index" or
{...
"link": {"timestamp": null},
"index": null,
"sort": ["index", "-link.timestamp"]
}
this at least will be predictable.
Alec
> http://api.freebase.com/api/trans/image_thumb/en/michael_jackson
>
> How would I get that same image using a query? A query with limit 1
> returns the second image in the gallery.
>
> "result": [{
> "/common/topic/image": [{
> "id": "/guid/9202a8c04000641f800000000aaabb43"
> }],
> "id": "/en/michael_jackson"
> }],
>
>
> I get the image_thumb image if I use this,
>
> [{
> "/common/topic/image": [{
> "id": null,
> "limit":1,
> "index":null,
> "sort":"index"
> }],
> "id": "/en/michael_jackson"
> }]
>
>
> Is this reliable even if images are not explicitly ordered?
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090626/d1478808/attachment.htm
More information about the Developers
mailing list