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 "Nuno Santos (Jira)" <ji...@apache.org> on 2022/08/16 10:20:00 UTC
[jira] [Resolved] (OAK-9874) Add a (failing and @Ignored) unit test to check that queries return same result with and without index.
[ https://issues.apache.org/jira/browse/OAK-9874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nuno Santos resolved OAK-9874.
------------------------------
Resolution: Fixed
This PR adds tests, the issue still needs to be fixed, see OAK-9900.
> Add a (failing and @Ignored) unit test to check that queries return same result with and without index.
> --------------------------------------------------------------------------------------------------------
>
> Key: OAK-9874
> URL: https://issues.apache.org/jira/browse/OAK-9874
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: indexing
> Reporter: Nuno Santos
> Priority: Major
>
> Consider the following nodes:
> ||node||propa||
> |/test/long|1234|
> |/test/double|1.11|
> |/test/string_numeric|"1234"|
> |/test/string|"1234a"|
> |/test/boolean_true|true|
> |/test/boolean_false|false|
> And the index:
> {noformat}
> /oak:index/testIndex
> - jcr:primaryType = "oak:QueryIndexDefinition"
> - type = "lucene"
> - compatVersion = 2
> - async = "async"
> + indexRules
> - jcr:primaryType = "nt:unstructured"
> + nt:base
> + properties
> - jcr:primaryType = "nt:unstructured"
> + assetType
> - propertyIndex = true
> - name = "propa"
> - type = "Long"
> {noformat}
>
> The following queries return different results when run with and without index:
> {noformat}
> Query: /jcr:root//*[@propa]
> With index: [/test/double, /test/long]
> Without index: [/test/boolean_false, /test/boolean_true, /test/double, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa > 0]
> With index: [/test/double, /test/long]
> Without index: [/test/boolean_true, /test/double, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa > '0']
> With index: [/test/double, /test/long]
> Without index: [/test/boolean_true, /test/double, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa = 1.11]
> With index: []
> Without index: [/test/boolean_false, /test/double]
> Query: /jcr:root//*[@propa = '1.11']
> With index: []
> Without index: [/test/boolean_false, /test/double]
> Query: /jcr:root//*[@propa > 1]
> With index: [/test/double, /test/long]
> Without index: [/test/boolean_true, /test/double, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa > '1']
> With index: [/test/double, /test/long]
> Without index: [/test/boolean_true, /test/double, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa > 1111]
> With index: [/test/long]
> Without index: [/test/boolean_true, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa > '1111']
> With index: [/test/long]
> Without index: [/test/boolean_true, /test/long, /test/string, /test/string_numeric]
> Query: /jcr:root//*[@propa = true]
> With index: []
> Without index: [/test/boolean_true]
> Query: /jcr:root//*[@propa = 'true']
> With index: []
> Without index: [/test/boolean_true]
> Query: /jcr:root//*[@propa = false]
> With index: []
> Without index: [/test/boolean_false]
> Query: /jcr:root//*[@propa = 'false']
> With index: []
> Without index: [/test/boolean_false]{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)