If you've attempted to send more than 20 objectId's in a single view event via the viewedObjectIDs you probably received the 422 Error: "Cannot process more than 20 objects in an event".
This error is warning you of the limitations of the viewedObjectID's parameter which can only take 20 objectID's in a single event. This can happen when you have more than 20 hitsPerPage.
The solution is to send these objectID's in multiple batches, i.e. more than one event. For example, if you have 40 hitsPerPage send two events with 20 objectID's each. Please reference the Send Events documentation when doing so.
Please note that these features are available on the latest versions of InstantSearch and AutoComplete so if you encounter this error with either library, update to the latest version.