Question

I'm wondering if it is possible to get all info about a specific date from Freebase.

I can easily retrieve info about a date giving a specific topic, for example, to grab all persons of interest who were born on a specific date:

[{
  "type":"/people/person",
  "limit":1000,
  "sort":"name",
  "name":null,
  "guid":null,
  "timestamp":null,
  "/people/person/date_of_birth":"1955-02-24"
}]

Is it possible to grab all types? I'm after things like people born on that date (which I have), major events (start of a war, assassination of a person of interest, etc), and so on.

Essentially I want to match all fields that are dates and return the full information about that entry, regardless of type.

Was it helpful?

Solution

Reflection is what you need here:

[{
  "/type/reflect/any_value": [{
    "type": "/type/datetime",
    "value": "1955-02-24",
    "link": {
      "source": {
        "id": null
      },
      "master_property": null
    }
  }]
}]

A couple of notes on that: the MQL manual I've linked to is somewhat bitrotted in its details but is still the best documentation that exists on MQL. Secondly, there's what I'm pretty sure is in MQL bug if you use "*": null or more specifically "target_value": null in the link clause above which makes it ignore the outer value you specified... so don't do that :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top