Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3402

getSize() returning too many often -1

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6.2, 2.7
    • None
    • None

    Description

      I've came accross the well known behaviour of query results returning -1 when asked for getSize().

      While this is ok for optimization reasons (lazy results fetching), I just discovered that the default "resultFetchSize" value in lucene queries is Integer.MAX_VALUE, so in all queries I've ever executed, all results were actually fetched before asking for getSize, so IMHO nothing prevents getSize() to return the real value instead -1

      Attachments

        1. QueryResultImpl.patch
          6 kB
          Cédric Damioli

        Activity

          People

            cdamioli Cédric Damioli
            cdamioli Cédric Damioli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: