2 Replies Latest reply on Oct 29, 2015 5:01 AM by Horia Chiorean

    Queries using indexes always return 100 results only.

    Guillem Folch Newbie

      Hello,

       

      I'm using Modeshape 4.4.0 and I've a repository with more than 20.000 documents (nodes with metadata) of a custom type.

      I'm trying to define indexes based on the queries that my app is doing and I'm getting always 100 results as maximum.

       

      This is my configuration for indexes.

       

      "node-types" : ["myTypes.cnd"],

          "indexProviders" : {

              "local" : {

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

                  "directory" : "index"

              }

          },

        "indexes" : {

              "docsByDeleted" : {

                  "kind" : "value",

                  "provider" : "local",

                  "nodeType" : "hes:document",

                  "columns" : "deleted(BOOLEAN)"

              }

        }

       

      All my documents are not deleted and I'm using a LIMIT 501 (via setLimit() method)

      • if I execute this query: select * from hes:document (with LIMIT 501). I receive 501 document results. If I'm not wrong I'm not using any index.
      • if I execute this query: select * from hes:document where deleted = false (with LIMIT 501). I only receive 100 documents. In that case I'm using the index.
      • if I execute this query: select * from hes:document where deleted = false (without LIMIT 501). I receive 20000 documents. In that case I'm using the index but not limiting the query.

       

      Is there a cofiguration somewhere to define a limit on the index results?

       

      Thanks in advance.