What kind of info? My point is that
from doc in docs
from item in doc.Collection
where doc.Collection != null
Doesn't actually do what you want it to do, because the from executes
before the where
I guess we could start doing
from doc in docs
from item in (doc.Collection ?? new dynamic[]
{})
select new
{
item.Property
};
That won't work either though, because if item.Property isn't found on
dynamic, it falls over too
I guess a custom dynamic type that just returns another custom dynamic
type when not found
from doc in docs
from item in (doc.Collection ?? new
CustomDynamicObject[]{})
select new
{
item.Property
};
(The problem with *that* is that then that happens in the select
statement too, so you have to add a where clause for each property
being mapped across.
More thoughts? I'm just thinking out loud here - our current strategy
where we just fall over and refuse to run that index isn't really good
enough for dynamic data.
We could just prevent falling over on all dynamic indexes, and just
ignore documents that fail to index silently, that works too.