You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (Jira)" <ji...@apache.org> on 2020/08/07 13:55:00 UTC

[jira] [Created] (OAK-9165) Lucene: unique sync property index don't work properly

Thomas Mueller created OAK-9165:
-----------------------------------

             Summary: Lucene: unique sync property index don't work properly
                 Key: OAK-9165
                 URL: https://issues.apache.org/jira/browse/OAK-9165
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: indexing, lucene, property-index
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller


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 

{noformat}
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]
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)