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

statistics the total number of documents return -1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 1.10.2
    • Fix Version/s: None
    • Component/s: core, query
    • Labels:
      None

      Description

      We use oak1.10.2 inside a web application to store documents 

      How can we program statistics such as : 

      • the total number of documents 
      • compute the number of documents per property values for a given property ?

      we try these code,but it return -1

      QueryManager qm = session.getWorkspace().getQueryManager(); 
      Query q = qm.createQuery("SELECT * FROM [nt:file] WHERE LOCALNAME() LIKE '%.txt' and [\"jcr:createdBy\"] = 'anonymous'", Query.JCR_SQL2); 
      QueryResult qr = q.execute(); 
      long stat = qr.getRows().getSize(); 

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zhouxu245 zhouxu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: