Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2576

Local Index Provider losing index results after updating a boolean attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.Final
    • 4.5.0.Final, 4.6.0.Final
    • Query
    • None

      I've defined an index like this:

       
      "indexProviders" : {
              "local" : {
                  "classname" : "org.modeshape.jcr.index.local.LocalIndexProvider",
                  "directory" : "index",
                  "cacheLRUEnable" : true,
                  "mmapFileEnable" : true,
                  "commitFileSyncDisable" : false
              }
          },
          "indexes" : {
              "editorsByIsActive" : {
                  "kind" : "value",
                  "provider" : "local",
                  "nodeType" : "hes:editor",
                  "columns" : "isActive( BOOLEAN )"
              }
        }
      

      And I run the following steps:

      Create node1 with mixin: hes:editor and with an attribute isActive = true
      Create node2 with mixin: hes:editor and with an attribute isActive = true
      Run the following queries
      select * from [hes:editor] where isActive=true - return 2 nodes
      select * from [hes:editor] - return: 2 nodes
      Update node2 setting isActive=false
      Run again the same queries
      select * from [hes:editor] where isActive=true - return 0 nodes
      select * from [hes:editor] - return: 2 nodes
      Reindex (calling reindex API)
      Run again the same queries
      select * from [hes:editor] where isActive=true - return 1 node
      select * from [hes:editor] - return: 2 nodes
      

      This is working in Modeshape 4.4.0.Final
      But it's failing in Modeshape 4.5.0.Final and 4.6.0.Final

              hchiorean Horia Chiorean (Inactive)
              folch Guillem Folch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: