[Developers] one query about two topics

Jack Alves jack.alves at gmail.com
Thu Aug 7 17:41:28 UTC 2008


Just for kicks I am trying to create a single query that will return
all topics linked to either of two specified topics, and if a cvt is
returned I want to know the sibling topics. I want to show all topics
they have in common and topics they don't have in common. For example,
if I specify Katharine Hepburn and Spencer Tracy I get get a bunch of
quotations from Katharine, and Film Performance mediators for both of
them. When I get a mediator I want to figure out what topic to display
("Bringing up Baby").

I tried a variety of things and wrote the convoluted query below. Can
you suggest a more straight forward approach? Would a different query
return quicker?

The guids below are Katharine Hepburn and Spencer Tracy.



[
  {
    "limit" : 50,
    "mates:/type/reflect/any_master" : [
      {
        "guid|=" : [
          "#9202a8c04000641f8000000000056d07",
          "#9202a8c04000641f800000000005b44f"
        ],
        "link" : [
          {
            "master_property" : {
              "id" : null,
              "name" : null,
              "schema" : {
                "domain" : {
                  "id" : null,
                  "name" : null
                }
              }
            }
          }
        ],
        "name" : null
      }
    ],
    "name" : null,
    "others:/type/reflect/any_master" : [
      {
        "name" : null,
        "type" : []
      }
    ],
    "sort" : "-others:/type/reflect/any_master.name",
    "type" : [
      {
        "/freebase/type_hints/mediator" : [],
        "name" : null
      }
    ]
  }
]


More information about the Developers mailing list