I have a page with >100k records. Each record has ID, type, title, text and a couple of optional attributes per type or record. One of the search frontends let’s the user search all records with a text search thru title, text, etc. and a sidebar showing the faceted type, for quick filtering.
But the sidebar with the types isn’t always showing all existing types because we hit
exhaustiveFacetsCount set to
false. Of course that’s bad for our users, because they might be missing existing record types. And as we generate the first result page on the server it’s not just a single user with bad results as long as a incomplete response gets cached.
At first I thought it might happen after an index update or on one of several servers. But sampling over some time shows always the same server responding and an even distribution, with about every third result being incomplete.
An example of a complete vs. an incomplete/timeout response can be seen at https://www.diffchecker.com/bgdPBDl3 The record values have been simplified, but all counts are the original data. You can see two of the existing types missing in the second result.
Is there a workaround or am I doing something wrong? Should I just retry the request and hope exhaustiveFacetsCount becomes true? Or is there a parameter signaling I’d prefer complete, but maybe slower, responses?