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

Lucene: unique sync property index don't work properly

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.34.0
    • Component/s: indexing, lucene, property-index
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: