jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Jain (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OAK-2999) Index updation fails on updating multivalued property
Date Tue, 07 Jul 2015 07:05:04 GMT

     [ https://issues.apache.org/jira/browse/OAK-2999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Amit Jain resolved OAK-2999.
----------------------------
    Resolution: Fixed

Thanks [~chetanm] for review. Incorporated the suggested changes.

* trunk - http://svn.apache.org/r1689581
* 1.0 - http://svn.apache.org/r1689583
* 1.2 - http://svn.apache.org/r1689584

> Index updation fails on updating multivalued property
> -----------------------------------------------------
>
>                 Key: OAK-2999
>                 URL: https://issues.apache.org/jira/browse/OAK-2999
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>    Affects Versions: 1.2, 1.0.15
>            Reporter: Rishabh Maurya
>            Assignee: Amit Jain
>             Fix For: 1.2.3, 1.3.3, 1.0.17
>
>         Attachments: OAK-2999-v2.patch, OAK-2999.patch
>
>
> On emptying a multivalued property, fulltext index updation fails and one can search
on old values. Following test demonstrates the issue.
> Added below test in [LuceneIndexQueryTest.java|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java]
which should pass - 
> {code}
>     @Test
>     public void testMultiValuedPropUpdate() throws Exception {
>         Tree test = root.getTree("/").addChild("test");
>         String child = "child";
>         String mulValuedProp = "prop";
>         test.addChild(child).setProperty(mulValuedProp, of("foo","bar"), Type.STRINGS);
>         root.commit();
>         assertQuery(
>                 "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
>                 "xpath", ImmutableList.of("/test/" + child));
>         test.getChild(child).setProperty(mulValuedProp, new ArrayList<String>(),
Type.STRINGS);
>         root.commit();
>         assertQuery(
>                 "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
>                 "xpath", new ArrayList<String>());
>         test.getChild(child).setProperty(mulValuedProp, of("bar"), Type.STRINGS);
>         root.commit();
>         assertQuery(
>                 "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
>                 "xpath", new ArrayList<String>());
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message