[Developers] Getting text language when reflecting

Philip Kendall philip-freebase at shadowmagic.org.uk
Sun Jul 19 20:22:24 UTC 2009


On Sun, Jul 19, 2009 at 12:24:19PM -0700, John Giannandrea wrote:
> 
> > That returns one property, /book/book_edition/ISBN and a value of
> > "1588467961". Is there any way I can simply extend the query to get  
> > the
> > language of that value as well?
> 
> yes, if the clause is of /type/text you can add lang:null

Is there a way to do it while still getting any values with types other
than /type/text? For example, consider...

{
  "id": "/guid/9202a8c04000641f800000000451473c",
  "/type/reflect/any_value": [{
    "value":         null,
    "link": {
      "master_property": {
        "id": null,
        "schema|=": [
          "/book/pagination"
        ]
      }
    }
  }]
}

Putting a "/type/text/lang":null clause in there seems to be silently
ignored.

I think I can do what I'm after with two clauses, one with
"type":"/type/text" and one with "type":{"id":"/type/text",
optional":"forbidden"} if there's no better way.

Thanks for the help.

Cheers,

Phil

-- 
  Philip Kendall <philip at shadowmagic.org.uk>
  http://www.shadowmagic.org.uk/


More information about the Developers mailing list