multiple exclusions in advanced title search

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Old thread

Is it possible to exclude genres with the following logic: NOT (animation OR (crime AND mystery)) ?
Photo of rootsmusic

rootsmusic

  • 92 Posts
  • 15 Reply Likes

Posted 4 years ago

  • 1
Photo of Nobody

Nobody

  • 1454 Posts
  • 705 Reply Likes
I'm not aware of any way to do that.

(See also my reply to you in another thread.)
Photo of Vincent

Vincent, Champion

  • 645 Posts
  • 501 Reply Likes
Just don't check the boxes:

http://www.imdb.com/search/title

If you select some of the genres and not others, it will attempt to leave the others out (mistakes happen with movies not properly tagged)

But if you wanted to leave out animation, you just wouldnt select animation as one of the check marked genre options
Photo of Nobody

Nobody

  • 1454 Posts
  • 705 Reply Likes
The OP wants to do e.g. this:
NOT (animation OR (crime AND mystery))

IIUC that means:
(1)  Exclude every title that has the Animation genre label.
(2)  Exclude every title that has both the
       Crime genre label and the Mystery genre label.
BUT:
(3)  Include non-animated titles labeled either Crime or Mystery but not both.
(4)  Include non-animated titles labeled neither Crime nor Mystery.

We can't do all that with the Advanced Search genre options.
We can't even do it by editing exclusion parameters in the search URL.

... Unless I'm wrong.  (-:
(Edited)
Photo of Vincent

Vincent, Champion

  • 645 Posts
  • 501 Reply Likes
that seems overly convoluted....
Photo of Nobody

Nobody

  • 1454 Posts
  • 705 Reply Likes
that seems overly convoluted....
Okay.  Boolean queries are "overly convoluted"?  Some database systems can support such complex logical queries (and more).  But some popular search systems cannot (such as Google for example).  (And, notably, Google has achieved extreme popularity and global search dominance without such complex query capabilities.)  So, yeah, you're right.  Who needs all that geeky Boolean stuff?
(Edited)
Photo of rootsmusic

rootsmusic

  • 92 Posts
  • 15 Reply Likes
Yes, Nobody's first comment is what I want to do.  Unfortunately, "whodunit" isn't a genre so I have to exclude both crime and mystery.  I was hoping to customize the search URL (it can be customized for #2 in Nobody's first comment but I can't add #1).
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
I don't know if I really understood your question but mine is: Is there a way to exclude one genre? (Your question seems to be more complex than this =P)
Photo of ljdoncel

ljdoncel, Champion

  • 747 Posts
  • 1477 Reply Likes
Hi, André:

The easiest way to exclude one single genre is to use the Advance Title Search to do a search including that single genre and then edit the generated URL by adding an exclamation mark (!) before the parameter genres.

E.g. Say you want to find films with a user rating between 7 and 9 that don't have the genre Crime label.
  1. Do an advance search selecting films with a user rating between 7 and 9 that have the genre crime:
  2. Check the generated URL:


  3. Add an exclamation mark before genres=:


  4. The results page will show films with a user rating between 7 and 9 that don't have the genre crime (ignore the misleading headline):



AlegreAlegre
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
Thank you very much! But in my case, I wanna search films of a genre and don't include others. For exemple: search for action films and don't include the genres comedy and horror. Is that possible?
Photo of ljdoncel

ljdoncel, Champion

  • 747 Posts
  • 1477 Reply Likes
André,

Unfortunately, AFAIK, that kind of query can't be done at this moment (not even tweaking the URL)... FacePalm
Your question seems to be more complex than this =P
Not really:
  • ACTION AND (NOT (COMEDY OR HORROR)) (three logical operators), or
  • ACTION AND (COMEDY NOR HORROR) (two logical operators)
If IMDB implemented the option to export search results into lists, doing complex filtering would be much easier. You can support this idea by giving a "Me too" in this thread.
(Edited)
Photo of ljdoncel

ljdoncel, Champion

  • 747 Posts
  • 1477 Reply Likes
Good news!

One of the most experienced and respected users on IMDb (I'm sure the most veteran of you will know who I'm talking about) has PM'ed me because he found out a way to construct more complex searches by editing the URL. The key point is that the same parameter (e.g. genres=) can be used twice in a query string as long as one of them is "negated" (e.g. !genres=) (i.e. with an exclamation mark before the field). That is to say, you can't concatenate (with &) two (or more) genres= in the same query, but you can use one genres= and one !genres= in the same URL.

Noting that every parameter is field=value (e.g. genres=action), we can use these operators:
  • ! (exclamation mark): NOT ~ before a field.
  • & (ampersand): LOGICAL AND ~ before a field.
  • | (vertical bar): LOGICAL OR ~ between values.
  • , (comma): LOGICAL AND ~ between values.
Operator NOT has precedence, e.g. "ACTION AND (NOT (COMEDY OR HORROR))" is equivalent to "ACTION AND NOT (COMEDY OR HORROR)".

Also, I believe that any vertical bar "predates" every commas, e.g.
  action,comedy,horror,drama
stands for "ACTION AND COMEDY AND HORROR AND DRAMA";
  action|comedy|horror|drama stands for "ACTION OR COMEDY OR HORROR OR DRAMA"; but,
  action,comedy,horror|drama or
  action,comedy|horror,drama or
  action|comedy,horror,drama
or
  action,comedy|horror|drama or
  action|comedy|horror,drama
are equivalent to action|comedy|horror|drama;
which limits the possibilities of combinations about values within a field to just two:
  • Results include every value of the field (A,B,C,...): A AND B AND C AND...
  • Results include any value of the field (A|B|C|...): A OR B OR C OR...
Summarizing, we can edit the URL to do searches with, at most, the following 8 syntaxes:
  1. value1 AND value2 AND value3...
    title?field1=value1,value2,value3...

  2. value1 OR value2 OR value3...
    title?field1=value1|value2|value3...

  3. NOT (value1 AND value2 AND value3...)
    title?!field1=value1,value2,value3...

  4. NOT (value1 OR value2 OR value3...)
    title?!field1=value1|value2|value3...

  5. (value1 AND value2 AND value3...) AND NOT (value4 AND value5 AND value6...)
    title?field1=value1,value2,value3...&!field1=value4,value5,value6...

  6. (value1 AND value2 AND value3...) AND NOT (value4 OR value5 OR value6...)
    title?field1=value1,value2,value3...&!field1=value4|value5|value6...

  7. (value1 OR value2 OR value3...) AND NOT (value4 AND value5 AND value6...)
    title?field1=value1|value2|value3...&!field1=value4,value5,value6...

  8. (value1 OR value2 OR value3...) AND NOT (value4 OR value5 OR value6...)
    title?field1=value1|value2|value3...&!field1=value4|value5|value6...

The search that André wants to do (action films, but excluding genres horror and comedy) can be expressed as "ACTION AND NOT (COMEDY OR HORROR)" and can be "translated" into the following URL: http://www.imdb.com/search/title?genres=action&!genres=comedy|horror&title_type=feature




Compare this results with this other question: action films that may be labeled horror or comedy, but not both, i.e. "ACTION AND NOT (COMEDY AND HORROR)": http://www.imdb.com/search/title?genres=action&!genres=comedy,horror&title_type=feature





I'll try to represent graphically all the possible results (yellow areas) involving two or three genres that can be retrieved via the 8 operations from above:

TWO GENRES (e.g. ACTION/COMEDY):
  • Syntax 1:




  • Syntax 2:


  • Syntax 3:




  • Syntax 4:


  • Syntax 5 (syntaxes 6 to 8 aren't needed when there are only 2 genres):



THREE GENRES (e.g. ACTION/COMEDY/HORROR):
(genres are interchangeables, so I'll only use ACTION as a reference to not flood the post; equivalent positions for other genres are represented as miniatures)
  • Syntax 1:




  • Syntax 2:



  • Syntax 3:




  • Syntax 4:



  • Syntax 5:




  • Syntax 6:


  • Syntax 7 (syntax 8 isn't needed when there are only 3 genres):


Every feasible queary involving two or three genres MUST MATCH one of the diagrams from above. The problem with rootsmusic's query "NOT (ANIMATION OR (CRIME AND MYSTERY))" is that is too complex and it doesn't fit any of the pictures:


While this works for genres, I'm not sure if it does for other parameters as well. I'll do some tests and I'll post here any problem.

I'd be really thankful if someone (user or IMDb staffer) could confirm what I posted above (and please correct it if there's any mistake)...

OKOK
Photo of Nobody

Nobody

  • 1454 Posts
  • 705 Reply Likes
... The problem with rootsmusic's query
"NOT (ANIMATION OR (CRIME AND MYSTERY))"
is that is too complex ...
Right; in other words we can't combine "OR" (... |value ...)  with "AND" (... ,value ...)  in a genre parameter, or genre exclusion in this case ("!genre=...").

(In another thread, I mentioned an experiment that I briefly tried some time ago, visually flagging a specified genre in search results.  So for example the Animation results could be flagged with a red mark, which in this case would make it easier to quickly "skip" them and focus on the other results.  I don't know if IMDb would allow us to use such a workaround.  I wonder if IMDb could consider providing an approved way to add customized visual cues in search results.)
(Edited)
Photo of Nobody

Nobody

  • 1454 Posts
  • 705 Reply Likes
^  (Oops.  Typo correction:  "!genre=..." should be "!genres=...")
(Edited)
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
First of all, I'm sorry that I took so long to answer! But the good thing is that you have news now! \o/I can't believe you found a way to do the search I wanted, and did it! THANK YOU SO MUCH!
These diagrams are amazing! So explanatory! Seeing my search in them is so cool! haha. Your effort to help the community is admirable! You deserve an award for all you did! And the user that helped you too! XD
I didn't find a "Me too" in your idea "Advanced Title Search should Let Me Copy the Whole List to Another List..", but I clicked like! ;)
But what we really need is more tools in the Advanced Title Search, so no one will have to change the URL and, as you said, searches like the rootsmusic one are not possible with this method. (Don't get me wonrg, I'm really not lowering your acheivement!). So, do you know if there's an idea asking for more tools, so we all can like it? And are the ideas really effective? Does IMDb staff really take them in consideration? Do you know of some that was used?
Once again, thank you!
Photo of ljdoncel

ljdoncel, Champion

  • 747 Posts
  • 1477 Reply Likes
Thank you very much, André. We're here to try to help!

A quick search revealed a few ideas (not many) on (more or less explicit) suggesting to improve the logical operations within the searching tools:
I hope IMDB expand the functionality eventually, but I'm afraid it's not one of their priorities at this moment...

Agradable
(Edited)
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
Thank you! And do you know if these ideas are really effective? Is there another way to communicate with IMDb?
Photo of ljdoncel

ljdoncel, Champion

  • 747 Posts
  • 1477 Reply Likes
do you know if these ideas are really effective?
Well, I can't say for sure, but IMDB staffers often encourage us to vote for ideas in order to prioritize future changes on the site, so I like to think that they do really care what we suggest.
Is there another way to communicate with IMDb?
Yes, there is: the HelpDesk, but it's mainly used to report problems or contribution issues that can't be solved by other ways (such as this forum). Also, is the preferred way to make suggestions like the ones with we're dealing in this thread.

Agradable
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
Ok, thank you! ;)
Photo of Daniele M.

Daniele M.

  • 1 Post
  • 1 Reply Like
Am i wrong or this workaround doesn't work anymore? i used it long time but today looks like something changed... i was usually using "http://akas.imdb.com/search/title?!genres=animation&!my_ratings=exclude&at=0&count=100&a..." but it does not exclude anymore Animation... any ideas? thx :)
Photo of André Lemi

André Lemi

  • 11 Posts
  • 7 Reply Likes
Daniele M. You are right! And it's not only with animation! This method is not working anymore! D= People please help!

This conversation is no longer open for comments or replies.