Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-26537

In AQL, when limit and offset are used, the 'end_pos' is not correct

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: AQL
    • Labels:
      None
    • Environment:

      Enterprise Plus 7.25.7 rev

    • Location:
      External

      Description

      I am using the following AQL query:

      items.find(
      {
        "repo":

      Unknown macro: {       "$eq"}

      ,
         "name":

      Unknown macro: {         "$match"}

      }
      ).include("name","repo","path","created")

      When executed I get all the elements and the range information in the response is:

          "range": 

      Unknown macro: {         "start_pos"}

       
      To avoid having problems when the response is too big (too many matches) I am using a limit and try to get the elements in chunks.

      My problem occurs when I attempt to get the second chunk using this query:

      items.find(
      {
        "repo":

      Unknown macro: {       "$eq"}

      ,
         "name":

      Unknown macro: {         "$match"}

      }
      ).include("name","repo","path","created").offset(1000).limit(1000)

       

      Running this, I get the correct matches but the end position in the range information seems to be wrong:

          "range": 

      Unknown macro: {         "start_pos"}

       

      Bug: If I read total 1000 elements from start_pos 1000, I expect the end_pos to be 2000 and not 1000. Keep in mind that there are 2859 matches without using the limit. It seems that there is no difference between end_pos and total.

      I assumed that I can set the offset for the next query to be the end_pos and this did not work.

       

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              Maxiniuc Alexandru
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-26547 -
                  SYNCHRONIZED
                  • Last Sync Date: