Problem/Motivation
See https://git.drupalcode.org/project/search_api_opensearch/-/blob/3.x/src/...
// Set the size and from parameters.
$body['from'] = $query->getOption('offset') ?? self::DEFAULT_OFFSET;
$body['size'] = $query->getOption('limit') ?? self::DEFAULT_LIMIT;
If a query is passed in that has no limit, then a limit of 10 is set. This means that any VBO submission for more than 10 items will only handle 10 items, even though it claims to handle more.
It puzzles me why we would want a limit of 10 on any query that comes in without a limit. Chances are those queries are using a condition of some sort and want to see all results for said condition. If you then add an arbitrary limit of 10, things get funky.
Steps to reproduce
- Build a search api view with an opensearch index
- Add VBO to said view
- Select more than 10 rows
- Submit
- See that the output only mentions the first 10 being handled
Proposed resolution
Do not set a default limit or offset if they are absent on the original query.
Remaining tasks
Do not set a default limit or offset if they are absent on the original query.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Issue fork search_api_opensearch-3548663
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
kristiaanvandeneyndeAlso present in latest version
Comment #5
kristiaanvandeneyndeComment #6
kristiaanvandeneyndeThat just moves the problem to Opensearch itself :D
https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search...
Comment #7
kim.pepperNW for linting failures.
Comment #8
kim.pepperComment #9
kim.pepperSeems like a sensible fix. The phpstan errors are because the baseline format has changed slightly so I regenerated it.
Comment #12
kim.pepperCommitted to 3.x and 2.x. Thanks!