[Developers] is everyone married to themselves?

Jason Douglas jason at metaweb.com
Mon Dec 17 18:01:45 UTC 2007


I was just trying to do a query for what schools the various U.S.  
first ladies attended and ran into an interesting problem:

{ "query" : [{
      "name" : null,
      "type" : "/people/person",
      "education" : [{
          "*" : null
        }],
      "spouse_s" : [{
          "spouse" : [{
              "name" : null,
              "type" : "/government/us_president"
            }]
        }]
    }]}

The problem is that this returns both the first lady *and* the  
president themselves.  In other words, that spouse clause looks at  
both ends of the marriage... is there a way to only look at the  
"other" end?

I suppose one hack would be to filter the top-level of the query on  
*not* being a U.S. president, but if Hillary is elected that would  
break for both her and Bill.

-jason


More information about the Developers mailing list