[Mulgara-dev] [Mulgara-svn] r1779 - trunk/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene

Life is hard, and then you die ronald at innovation.ch
Thu Aug 20 06:08:19 UTC 2009


On Wed, Aug 19, 2009 at 10:09:55PM -0700, pag at mulgara.org wrote:
> Author: pag
> Date: 2009-08-19 22:09:53 -0700 (Wed, 19 Aug 2009)
> New Revision: 1779
> 
> Modified:
>    trunk/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java
> Log:
> Removed exception chains for FullTextStringIndexExceptions as these
> may not be instantiated at the client side.
> 
> Modified: trunk/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene/LuceneResolver.java
[snip]
>      protected void doStart(LuceneTxInfo tx, int flags, boolean isNew) {
>        currentIndexes.set(tx.indexes);
> +      boolean newIndexReference = resolver.indexes == null;
>        resolver.indexes = tx.indexes.values();
> +      if (newIndexReference) {
> +        try {
> +          for (FullTextStringIndex index: resolver.indexes) index.optimize();
> +        } catch (FullTextStringIndexException e) {
> +          logger.error("Unable to optimize the Lucene indexes", e);
> +        }
> +      }

I don't get this: Why are you doing an optimize on every transaction
start rather than at commit time?

Also, this has nothing to do with exception chains, so why is this
here in this commit?


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list