Skip to content

Search result limit can truncate results due to incorrect numbering of slots #2

@townxelliot

Description

@townxelliot

When results are returned for a search, the slot numbering isn't sequential. This means that the first result for the search may have the index 10, rather than 1, for example:

http://acropolis.org.uk/?media=any&offset=0&limit=10&q=dench

Note that the result has the number 10 even though there is a single result.

While this doesn't make a big difference most of the time, search results can be truncated if results have a high numbered index and a limit is set. For example, the same search as shown above, but without a limit, returns 2 items:

http://acropolis.org.uk/?media=any&offset=0&q=dench

Note that the second item has an index 17. But because the limit was set to 10, and 17 > 10, this result was not included in the first "page" of results for the limit=10 search, even though there are only 2 results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions