A collection of quotes from Thilo about global indexes.  After reading
all these I think I finally might be on the same wavelength... (we'll
see in a moment :)

On 12/22/06, Thilo Goetz <[EMAIL PROTECTED]> wrote:
 <snip/>
Global indexes should be shared.  That is
also the spirit of the OASIS draft, I think.  The draft spec doesn't
talk about indexes, true, but it certainly has been informed by our
implementation.
 <snip/>
What I mean is that there is no way for a global index not to be part of
a view.  Or without the double negation: every global index is part of
every view.
 <snip/>

The only rule of visibility is that one view can not access the
view-specific indexes of another view.  Everything else is always
visible.
<snip/>
All CAS-global indexes are visible from/belong to every
view, view-local indexes have one instance per view, and no global
instance.  That's what I meant, but as I said, much more sophisticated
schemes could be imagined.



So, the suggestion is that for an index definition that's declared
"global", there would be only one instance in the entire CAS.  But
that one instance would be in the Index Repository of all views.
Therefore, calling myView.addFsToIndexes(fs) would add fs to this
global index, whereupon it would be visible from all other views (via
myOtherView.getIndexRepository().getIndex(name).iterator().

I'm a little uncomfortable with how this makes it nearly transparent
whether an index is local or global.  I don't think this fits so well
with some basic ideas of Views, namely:

(a) There should be a straightforward operation that adds something to
a view without impacting other views

(b) There should be a straightforward operation that gets me the
members of a view.


I think of indexes as our implementation of view membership.  So I
want to think of operation (a) is being myView.addFsToIndexes(fs) and
operation (b) as myView.getIndexRepository().getIndexes() [although,
I'd like a more convenient way].

The global indexes don't fit so well there... because
myView.addFsToIndxes(fs) violates the "without impacting other views"
restriction in (a).

How about the slightly different thought (which I think we were at
least close to agreeing to yesterday).

* There is one "Global Index Repository" in the CAS (accessible by
CAS.getGlobalIndexRepository() and CAS.addFsToGlobalIndexes())

* Each view has its own Index Repository, containing only the indexes
that are specific to that view. (accessible by
CasView.getIndexRepository() and CasView.addFsToIndexes()).

* There may be an additional method CAS.getCompleteIndexRepository()
which returns an IndexRepository that contains ALL indexes in the
entire CAS, including the global indexes as well as all indexes in all
views.  However, I argued that this index repository should be
read-only (i.e. not support addFS()), because adding an FS to all
views in one fell swoop seemed like to dangerous an operation.

-Adam

Reply via email to