[elephant-devel] inherited indices
Alex Mizrahi
killerstorm at newmail.ru
Thu Apr 28 16:31:59 UTC 2011
> Why? I am by no means an expert and never looked thoroughly the code,
> but ,abstractly speaking, doesnt it boil down to just creating
> more indexes automatically at class definition time?
Code assumes that there is only one index it needs to update at time, so it
needs to be revised to handle many of them.
Nothing particularly hard, but it requires some code rewriting and thus
While another alternative is pretty much trivial.
> Independently of the whole subject, I think this should be done anyway,
> and it can be an optional param with a default for old behaviour for those
> who want the whole pie.
> I think many people subtypep the results of get-instance family funcs
> early in their projects.
I don't think that 'old behaviour' was intentional, people should not depend
on query for one sub-class returning instances of another sub-class.
And it is trivial to fix it -- just pass super-class instead of sub-class to
this function if you want all instances.
So I think get-instances-by-... should unconditionally do the filtering.
While map-inverted-index probably shouldn't do the filtering. I consider it
a lower-level API which works with index directly, without a promise to
return instances of certain class.
And also implementing it at that level is somewhat harder.
More information about the elephant-devel
mailing list