1 Reply Latest reply on Apr 4, 2016 2:41 AM by Horia Chiorean

    How can I configure modeshape 4.2.0 to use local index?

    Piyapong Charoenwattana Newbie

      I have tried to query 100k nodes in repository. Here is my jcr-sql2.

      SELECT res.[jcr:path] AS sub FROM [fedora:Resource] AS [res] JOIN [fedora:Resource] AS [per] ON res.[jcr:uuid] = per.[webacl:accessTo_ref] WHERE res.[jcr:mixinTypes] = 'fedora:Container' AND res.[model:hasModel] = 'GenericFile' AND per.[model:hasModel] = 'Hydra::AccessControls::Permission' AND per.[webacl:agent] = CAST('http://projecthydra.org/ns/auth/group#public ^^ URI' AS BINARY) LIMIT 500 OFFSET 0

      I have checked in the query.explain.getPlan. It does not seem to use any of indexes that I have created. Thanks,

      Here is my index configuration.

          "indexProviders" : {

              "local" : {

                  "classname" : "org.modeshape.jcr.index.local.LocalIndexProvider",

                  "directory" : "${fcrepo.modeshape.index.directory}",

                  "cacheLRUEnable" : true,

                  "mmapFileEnable" : true,

                  "commitFileSyncDisable" : true,

                  "transactionDisable" : true,

                  "asyncWrite" : true,

                  "cacheSize" : 100

              }

          },

          "indexes" : {

              "jcrMixinTypes" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "jcr:mixinTypes(NAME)"

              },

              "uuid" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "jcr:uuid(STRING)"

              },

              "localName" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "mode:localName(STRING)"

              },

              "accessTo" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "webacl:accessTo_ref(STRING)"

              },

              "hasModel" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "model:hasModel(STRING)"

              },

              "agent" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "webacl:agent(STRING)"

              },

              "lastModified" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "jcr:lastModified(DATE)"

              },

              "type" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "dcterms:type(STRING)"

              },

              "hasCollectionId" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "uatermsid:hasCollectionId(STRING)"

              },

              "isCommunity" : {

                  "kind" : "value",

                  "provider" : "local",

                  "synchronous" : "false",

                  "nodeType" : "fedora:Container",

                  "columns" : "uatermsid:is_community(STRING)"

              }

          }