selecting unknown properties

  1.  
    1. Hi I'm sure this exists somewhere in all the docs available but I haven't been able to find it; I am building an app which treats freebase as a graph and therefore needs a query which treats records as nodes with arbitrary properties. This is more or less the functionality of the freebase search function. If I select the /common/topic "norway", I need a query which will return all its properties, and somehow give me the ids of all its related objects (location, country, governmental jurisdiction etc) so that I can do the same thing on them.

      All of the MQL examples focus on getting defined, very restricted sets of data so I'm not really sure how to go about this.

      1. Ok i found it!
        [
        {
        "/type/reflect/any_master" : [
        {
        "id" : null,
        "link" : null,
        "name" : null,
        "type" : []
        }
        ],
        "/type/reflect/any_reverse" : [
        {
        "id" : null,
        "link" : null,
        "name" : null,
        "type" : []
        }
        ],
        "/type/reflect/any_value" : [
        {
        "link" : null,
        "type" : null,
        "value" : null
        }
        ],
        "id" : whatever
        }
        ]
        awesome!

      2. ok but here's a new problem with that approach:
        "/type/reflect/any_master" : [
        {
        "*" : null,
        "link" : null,
        "name" : null,
        "type" : []
        }
        ]
        will for instance give me lots of records I don't want. I need to filter it by type, but I can't seem to find any syntax for that. exclusion operators don't work on ids so I can't say "type": [ "id~=":"/type/permission" ] or whatever it would be. Any way to do this in the query?

      3. Hi zwit, have you read the latest version of the MQL tutorial? I think it should cover what you're trying to do. If not, ask for more help.



    Discussion is posted in:

    Think this discussion also relates to something else? Cross-post it by adding a new discussion area:

Related Discussions