[Developers] Querying schema + instances
Eynard, Davide
davide.eynard at hp.com
Tue Aug 19 01:22:16 UTC 2008
Hi Jason,
wow, thanks a lot! I feel such a newbie :)
I think this is exactly what I was searching for.
If I understood well, the only URLs it's not gonna
work with are those which are built automatically from
enumeration IDs such as IMDB or Wikipedia, right?
I think I can handle them separately...
Thank you very much,
da
-----Original Message-----
From: developers-bounces at freebase.com [mailto:developers-bounces at freebase.com] On Behalf Of Jason Douglas
Sent: Monday, August 18, 2008 6:08 PM
To: For discussions about MQL, Freebase API and apps built on Freebase
Subject: Re: [Developers] Querying schema + instances
Does this do what you're asking for?
[{
"type" : "/type/link",
"target" : {
"type" : "/common/webpage",
"uri" : "http://www.freebase.com"
},
"master_property" : {
"id" : null,
"name" : null
},
"source" : {
"id" : null,
"name" : null
}
}]
For these kinds of "survey the graph for patterns" questions, I
usually find it easier to query the links rather than the objects.
-jason
On Aug 18, 2008, at 5:49 PM, Eynard, Davide wrote:
> Hi all,
>
> I'm trying to query all the topics which contain one
> "/common/webpage" in their schemas for some given URL,
> but I'm not having much success. My problem is that,
> given a URL, I'd like to find the topics that refer
> to that URL: however, they could refer to it as a
> normal weblink (as in /common/topic), as an IMDB film
> page (as in /film/film), as an artist page (as in
> /music/artist) and so on.
> I can easily get the list of types which contain one
> property that points to a /common/webpage:
>
> [
> {
> "id" : null,
> "name" : null,
> "properties" : [
> {
> "expected_type" : "/common/webpage",
> "id" : null,
> "name" : null
> }
> ],
> "type" : "/type/type"
> }
> ]
>
> So the basic approach I thought about was to try to
> build up a query based on this information. I have
> the type, the name of the property whose type is
> a webpage, so it should not be impossible to build an
> MQL query which will automatically adapt for any
> future schema. However, I was wondering if there was
> a way to do this only in MQL, without the need to
> pass though an external app.
>
> Any hints? :)
>
> Cheers,
>
> da
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
_______________________________________________
Developers mailing list
Developers at freebase.com
http://lists.freebase.com/mailman/listinfo/developers
More information about the Developers
mailing list