You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2007/05/19 14:10:49 UTC

setting up index repositories for views

CASImpl has a method initCASIndexes.

This method is called by lots of test cases, and by the main routine of 
doCreateCAS - it is supposed to set up the "built-in" indexes for the CAS.

It sets up 2 of these:

1) the "AnnotationIndex"

2) the "SofaIndex": an index over SofaFSs.


It seems to me that these are being set up in the "base" CAS. 

Later, I see when a new View is created, it calls
   new CASImpl(the baseCas,  aSofa) - which calls
       new FSIndexRepositoryImpl(this,
         (FSIndexRepositoryImpl)cas.getBaseIndexRepository());
to set up the view's index repository.

That constructor seems to use the base CAS's indexes to set up 
corresoponding indexes in the view.  This has the effect that each view 
has the built-in "SofaIndex" as well as "AnnotationIndex"

Should the base view only have a "SofaIndex" (and not an 
"AnnotationIndex") and should the other views not have a "SofaIndex"? 

-Marshall

Re: setting up index repositories for views

Posted by Eddie Epstein <ea...@gmail.com>.
On 5/19/07, Marshall Schor <ms...@schor.com> wrote:
> Should the base view only have a "SofaIndex" (and not an
> "AnnotationIndex") and should the other views not have a "SofaIndex"?
>

Note that since users are not allowed to index anything in the base
CAS, ideally there would be nothing but the SofaIndex in the base CAS
IR. It may not be so easy to do this optimization, and would not be
much of a win, as the indexes in the base CAS get created once, and
then are unused, except for the SofaIndex.

Eddie