Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-12154

MB Search API is broken, no pagination possible

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Search, Web service
    • None

      MB Search API documentation says you can use offset and limit to paginate the results of a query, but it does not work:

      /ws/2/<entity-type>/?query=<query>&limit=100&offset=<offset>

      Try with a query that returns more than 100 results, try with offset=0 or offset=101.
      Results are ordered randomly.
      If you paginate through all possible offsets to collect all results, you will have duplicates of some items and you will miss other items, randomly, always.

      So the offset system is broken, since SOLR, probably?

      Could we have a sort order set for all queries? It could be anything like, for instance, order by row ID.


      Old description, before noticing it was a global issue:

      I try to use /ws/2/work?query=…&offset=x&limit=y in JSON.
      The results are never ordered in the same fashion, even between two calls of the same query and same limit with a different offset to fetch pages.

      Therefore it's impossible to use this web service when there can be more than 100 results.

            alastairp Alastair Porter
            jesus2099 jesus2099
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

                Version Package