# Use of ContainsAny in EntityClass

The documentation page for EntityClass states that

Property values in implicitly defined entity classes may make use of Quantity (and intervals of Quantity) for dimensional values, DateObject for dates, TakeLargest and TakeSmallest for ordinal selections, and ContainsAll, ContainsExactly, ContainsAny, ContainsOnly, ContainsNone for entities. Lists of entities are interpreted as ContainsAll, while a single entity is interpreted as ContainsAny[{entity}].

If I run the following command with TakeLargest, I get the output I intended.

EntityValue[EntityClass["TropicalStorm", {"WindSpeed" -> TakeLargest[10]}], "WindSpeed", "EntityAssociation"]


However, if I execute the following with ContainsAny

EntityValue[EntityClass["TropicalStorm", {"Basin" -> ContainsAny[{"North Atlantic Ocean", "North Indian Ocean"}], "WindSpeed" -> TakeLargest[10]}], "WindSpeed", "EntityAssociation"]


the output is

Missing["QueryValueIncompatibleWithProperty", {"TropicalStorm", "Basin", ContainsAny[{"North Atlantic Ocean", "North Indian Ocean"}]}]


What is the proper syntax for using ContainsAny in this context?

I apologize if this is a trivial question... I am new to the language.

Thanks!

• Appears that it could be a bug. You should report to WRI. Also, you will need to use "NorthAtlanticOcean" and "IndianOcean" once it is fixed as these are the entity names for these oceans. – Edmund Jan 25 '17 at 10:22
• @Edmund Thanks for the quick response! With regard to your second point, I also thought that "NorthAtlanticOcean" would be the canonical name but it seems that this command works EntityValue[EntityClass["TropicalStorm", {"Basin" -> "North Atlantic Ocean", "WindSpeed" -> TakeLargest[10]}], {"Basin", "WindSpeed"}, "EntityAssociation"] while this command does not EntityValue[EntityClass["TropicalStorm", {"Basin" -> "NorthAtlanticOcean", "WindSpeed" -> TakeLargest[10]}], {"Basin", "WindSpeed"}, "EntityAssociation"] – Grayscale Jan 25 '17 at 14:11