[Developers] name is null in search results?
Christopher R. Maden
crism at metaweb.com
Wed Dec 5 01:56:57 UTC 2007
Arthur van Hoff wrote:
> I found that when you search for “Brittain” one result is returned by
> /api/service/search which has a name property that is null. Is that a
> legal result? It broke my application since I was assuming that all
> returned objects would have a name property.
It is not guaranteed that all objects will have English names, nor names
at all. In particular, compound value types, such as mailing addresses
(which <URL:
http://www.freebase.com/view/guid/9202a8c04000641f8000000004074694 > is)
will rarely have display names.
It is true, however, that things without names are probably not of
primary interest to users, and could be filtered out of your results.
(It is, IMO, proper for the relevance search to return them, because
someone might be searching for things on Brittain Rd., in this case.)
It is also true that nearly all topics — though there is not a guarantee
of all — will have names, but again, the names may not be English. (For
instance, musical albums in languages other than English whose titles
are almost or entirely non-Latin characters are not labeled as English,
since the labels are not meaningful to non-English speakers.)
As a general rule, open queries where the types and instances could be
anything should be written as loosely as possible, or any constraints
(such as must-have-a-name) should be expressed in the query (e.g.
"name" : { "value" : null, "lang" : "/lang/en" }
in order to require an English name).
~Chris
--
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >
More information about the Developers
mailing list