Freebase Query - Exception of Certain Values

I want to get the name of all the films and their genre. This is normal if the genre information is empty, but if the genre is known, I want to restore it.

"/film/film/genre": [{"id":null,"optional":"optional"}]

But I'm not interested in gay pornography, so I want to exclude all films with the genre "/ o / gay_pornography".

"/film/film/genre": [{"id|=":["/en/gay_pornography"],"optional":"forbidden"}]

The problem is how to combine it in one query? That is, how to get all the films, even those who do not have a genre, and exclude pr0n?

Edit: It is necessary to exclude several genres, for example. also / ru / pornographic_movie

+5
source share
2 answers

You are basically there: you just need two "genres". MQL allows you to do this by allowing arbitrary prefixes in any section:

[{
  "id": null,
  "type": "/film/film",
  "genre": [{
    "id":       null,
    "optional": true
  }],
  "forbid:genre": {
    "id|=": [
      "/en/gay_pornography",
      "/en/pornographic_movie"
    ],
    "optional": "forbidden"
  }
}]​

http://tinyurl.com/4449ufg

+4

", " :

 "genre": [{
    "id":       null,
    "id!=":     "/en/gay_pornography",
    "optional": true
  }]

: http://tinyurl.com/3tjdb4j

: . , . phillip-kendal .

0

All Articles