Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9165

Lucene: unique sync property index don't work properly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.34.0
    • indexing, lucene, property-index
    • None

    Description

      Looks like Lucene already supports unique property indexes, by setting "sync" = true and "unique" = true on the indexed property.

      But there is a bug: you can create a unique property index if there is a duplicate entry in the content. Reindexing succeeds. But then removing the duplicate entry in the content fails with:

      I got the following exception

      java.lang.NullPointerException: null
      	at org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy.remove(UniqueEntryStoreStrategy.java:92) [org.apache.jackrabbit.oak-core:1.14.0.SNAPSHOT]
      	at org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy.update(UniqueEntryStoreStrategy.java:78) [org.apache.jackrabbit.oak-core:1.14.0.SNAPSHOT]
      	at org.apache.jackrabbit.oak.plugins.index.lucene.property.PropertyIndexUpdateCallback.propertyUpdated(PropertyIndexUpdateCallback.java:98) [org.apache.jackrabbit.oak-lucene:1.14.0.SNAPSHOT]
      	at org.apache.jackrabbit.oak.plugins.index.search.CompositePropertyUpdateCallback.propertyUpdated(CompositePropertyUpdateCallback.java:46) [org.apache.jackrabbit.oak-lucene:1.14.0.SNAPSHOT]
      	at org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.propertyUpdated(LuceneIndexEditor.java:378) [org.apache.jackrabbit.oak-lucene:1.14.0.SNAPSHOT]
      

      Attachments

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: