Nuno Santos created OAK-9874:
--------------------------------
Summary: Some queries return different results when run with and
without an index
Key: OAK-9874
URL: https://issues.apache.org/jira/browse/OAK-9874
Project: Jackrabbit Oak
Issue Type: Bug
Components: indexing
Reporter: Nuno Santos
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)