Forum Discussion

Vedraj's avatar
Vedraj
Contributor
8 years ago

Returning all results from LiQL query

I am passing a query but the maximum number of results that is being returned is 1000. I understand there is an OFFSET option, but when I pass this query: 'SELECT distinct title,parent_category FROM boards LIMIT 1000 OFFSET 1000', nothing is returned. What I am looking for is returning the next 1000 results and so on until I can access all the results.

  • Vedraj - Do you know how many total results do you have? The first step is to get the total number of results and then get the offset value based on that.
    • Vedraj's avatar
      Vedraj
      Contributor
      I am not sure how many results I am expecting to have. However to your point if nothing is being returned after OFFSET 1000, does that mean I have reached the end of my results?
      • Vedraj - I think I wasn't clear in my last post. You need to get the number of results via the API and then use it further. Once you get the count, you will also get the answer to this question:


        Vedraj wrote:
        I am not sure how many results I am expecting to have. However to your point if nothing is being returned after OFFSET 1000, does that mean I have reached the end of my results?

        I hope this helps.