Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2583

Indexes deconfigured via WildFly configuration are still in use

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 5.0.0.Final
    • 4.6.0.Final
    • JCR
    • None
    • Hide

      1. Configure indexing:

      <!-- Index provider -->
      <index-providers>
          <index-provider
              name="lucene"
              classname="lucene"
              module="org.modeshape.index-provider.lucene"
              lockFactoryClass="org.apache.lucene.store.NoLockFactory"
              directoryClass="org.apache.lucene.store.RAMDirectory"
              codec="Lucene53"/>
      </index-providers>
      <!-- A pair of indexes -->
      <indexes>
          <index name="ns:foo" provider-name="lucene" kind="text" synchronous="true" node-type="nt:base" columns="ns:foo(STRING)"/>
          <index name="ns:bar" provider-name="lucene" kind="text" synchronous="true" node-type="nt:base" columns="ns:bar(STRING)"/>
      </indexes>
      

      2. (Re)start WildFly and add some nodes with properties mentioned in indexes section of above config.

      3. Query the nodes added at step 2 and make notice of jcr:score in results - it should be not equal to "1.0" when lucene indexes are in use. Or look at log when DEBUG level for org.modeshape is enabled:

      21:43:26,278 DEBUG [org.modeshape.jcr.RepositoryQueryManager] (modeshape-reindexing-7-thread-1) Performing full reindexing for repository 'test' and workspace 'default'
      ...
      21:43:26,689 DEBUG [org.modeshape.jcr.index.lucene.LuceneIndexProvider] (modeshape-reindexing-7-thread-1) Enabled index 'ns:foo' from provider 'lucene' in workspace 'default' after reindexing has completed
      21:43:26,690 DEBUG [org.modeshape.jcr.index.lucene.LuceneIndexProvider] (modeshape-reindexing-7-thread-1) Enabled index 'ns:bar' from provider 'lucene' in workspace 'default' after reindexing has completed
      

      4. Deconfigure indexes - remove indexes section from configuration file:

      <index-providers>
          <index-provider
              name="lucene"
              classname="lucene"
              module="org.modeshape.index-provider.lucene"
              lockFactoryClass="org.apache.lucene.store.NoLockFactory"
              directoryClass="org.apache.lucene.store.RAMDirectory"
              codec="Lucene53"/>
      </index-providers>
      

      5. Repeat steps 2-3 and make sure that lucene indexes are in effect until you remove index-providers section from config.

      Show
      1. Configure indexing: <!-- Index provider --> <index-providers> <index-provider name="lucene" classname="lucene" module="org.modeshape.index-provider.lucene" lockFactoryClass="org.apache.lucene.store.NoLockFactory" directoryClass="org.apache.lucene.store.RAMDirectory" codec="Lucene53"/> </index-providers> <!-- A pair of indexes --> <indexes> <index name="ns:foo" provider-name="lucene" kind="text" synchronous="true" node-type="nt:base" columns="ns:foo(STRING)"/> <index name="ns:bar" provider-name="lucene" kind="text" synchronous="true" node-type="nt:base" columns="ns:bar(STRING)"/> </indexes> 2. (Re)start WildFly and add some nodes with properties mentioned in indexes section of above config. 3. Query the nodes added at step 2 and make notice of jcr:score in results - it should be not equal to "1.0" when lucene indexes are in use. Or look at log when DEBUG level for org.modeshape is enabled: 21:43:26,278 DEBUG [org.modeshape.jcr.RepositoryQueryManager] (modeshape-reindexing-7-thread-1) Performing full reindexing for repository 'test' and workspace 'default' ... 21:43:26,689 DEBUG [org.modeshape.jcr.index.lucene.LuceneIndexProvider] (modeshape-reindexing-7-thread-1) Enabled index 'ns:foo' from provider 'lucene' in workspace 'default' after reindexing has completed 21:43:26,690 DEBUG [org.modeshape.jcr.index.lucene.LuceneIndexProvider] (modeshape-reindexing-7-thread-1) Enabled index 'ns:bar' from provider 'lucene' in workspace 'default' after reindexing has completed 4. Deconfigure indexes - remove indexes section from configuration file: <index-providers> <index-provider name="lucene" classname="lucene" module="org.modeshape.index-provider.lucene" lockFactoryClass="org.apache.lucene.store.NoLockFactory" directoryClass="org.apache.lucene.store.RAMDirectory" codec="Lucene53"/> </index-providers> 5. Repeat steps 2-3 and make sure that lucene indexes are in effect until you remove index-providers section from config.

    Description

      Removing indexes definitions form WildFly configuration file doesn't give an effect - indexes are still in use.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            zcc39r Rustam Usmanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: