FreeBase MQL filter, where value == null?

Can I get all triples with a null value in a specific field? Are all people with date_of_birth equal to zero?

[ "type": "/people/person", "date_of_birth":null, "name":null ] 
+4
source share
2 answers

You need to use "optional": forbidden directive :

 [{ "type": "/people/person", "date_of_birth": { "value": null, "optional": "forbidden" }, "name": null, "id": null }]​ 

(I added "id":null , so the Query Editor provides interactive links)

Note that the query has a default value of "limit":100, , if you want more results, then add an explicit limit clause. If this is the time, then you need to use the MQL cursor .

+5
source

If you need to deal with a multitude of results, the page parameter of an undocumented envelope provides more flexibility than the cursor, which allows you to move forward, backward, or access a page at random rather than just going forward as you can with the cursor .

Optional: The ban clause is the key to many useful queries. The equivalence of β€œ! All” == β€œnothing” is just one of the most common.

Tom

+1
source

All Articles