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 "Nitin Gupta (Jira)" <ji...@apache.org> on 2022/08/16 10:13:00 UTC
[jira] [Commented] (OAK-9874) Some queries return different results when run with and without an index
[ https://issues.apache.org/jira/browse/OAK-9874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580222#comment-17580222 ]
Nitin Gupta commented on OAK-9874:
----------------------------------
trunk - [https://github.com/apache/jackrabbit-oak/commit/56fca22fa4477149b4994d71d17d9f009c6481f1]
> 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
> 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)