Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9900

Some queries return different results when run with and without an index

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • indexing
    • None

    Description

      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:

      /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"
      

       

      The following queries return different results when run with and without index:

      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]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nuno.santos Nuno Santos
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: