Yes, it works, but there is a nasty trick there.
store.DatabaseCommands.PutIndex("test", new IndexDefinition<object>()
{
Map = docs => from i in docs.WhereEntityIs<Animal>("Cats", "Dogs")
select new {i.Color}
}.ToIndexDefinition(store.Conventions));
This will not:
store.DatabaseCommands.PutIndex("test", new IndexDefinition<Animal>()
{
Map = docs => from i in docs.WhereEntityIs<Animal>("Cats", "Dogs")
select new {i.Color}
}.ToIndexDefinition(store.Conventions));
I am fixing this now