jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rishabh Maurya (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-2258) Issue with range queries on Long field
Date Thu, 06 Nov 2014 15:00:55 GMT

    [ https://issues.apache.org/jira/browse/OAK-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14200257#comment-14200257
] 

Rishabh Maurya commented on OAK-2258:
-------------------------------------

In order to test I created following test in org.apache.jackrabbit.oak.plugins.index.property.OrderedPropertyIndexTest.java
 -  
{code}
    @Test
    public void queryBetweenIncludeBoth1() throws Exception {
        setTraversalEnabled(false);
        // initialising the data
        Tree rTree = root.getTree("/");
        Tree test = rTree.addChild("test");
        root.commit();
        for (int i = 0; i < 20; i++) {
            test.addChild(i + "").setProperty(ORDERED_PROPERTY, i);
        }
        root.commit();
        String query = "//* [(@" + ORDERED_PROPERTY + " > 0 and @" + ORDERED_PROPERTY +
" <= 10)]";
        List<String> results = executeQuery(query, "xpath");
        assertTrue("result is " + results, results.size() == 10);
        setTraversalEnabled(true);
    }
{code}

if nothing is wrong with test, it should pass but was failing and results.size() is coming
as 2.

> Issue with range queries on Long field
> --------------------------------------
>
>                 Key: OAK-2258
>                 URL: https://issues.apache.org/jira/browse/OAK-2258
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>    Affects Versions: 1.0.8
>            Reporter: Rishabh Maurya
>
> Running following query gives incomplete result set - 
> {code}
> //* [(@foo > 0 and @foo <= 10)]
> {code}
> where foo is an ordered property index.



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

Mime
View raw message