bbcarchdev / acropolis

A toolkit for building knowledge graphs
https://bbcarchdev.github.io/acropolis
8 stars 6 forks source link

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

Open townxelliot opened 7 years ago

townxelliot commented 7 years ago

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.

nevali commented 7 years ago

This is a bug in bbcarchdev/spindle; I'm pretty confident it's a dupe. I'll double-check.