[Date Prev][Date Next]
RE: broken indexing
Let me clarify the clarification... (I should really finish
my morning coca-cola before posting :-).
In 2.0 code, if one says:
index attr eq
an equality index is generated for assertions of attr. If
attr is the supertype of sub, then values of sub must be
included as if they were values of attr. This is necessary
so that entries containing "sub: foo" are candidates of
In HEAD (and in 2.0 as a non-default "subtypes" feature), there is
an added feature in that if one asserts sub and sub does not
have its own index, then the index for its supertype (e.g. attr)
is used to generate candidates. That is, if one asserts (sub=foo),
the attr index is used if sub is not indexed. This is the default
now as its believed that a supertype index is better than no index.
Then there is "autosubtyping", here one says:
index attr eq,autosubtypes
and this works as if the user had specified:
index attr eq
index sub eq (for all subtypes of attr)
The difference is that the keys for these are located in
1 DB instead of 1+N DBs. It differs from the "subtypes"
feature in that separate keys are generates for each subtype.
That is, if someone asserts (sub=foo), the sub index located
in the attr DB is used. If someone asserts (attr=foo), the
attr index located in the attr DB is used.
The usefulness of the "autosubtypes" feature is questionable.
I would have no problem if this feature disappeared.