well-typed / full-text-search

An in-memory full text search engine library. It lets you run full-text queries on a collection of your documents.
Other
47 stars 5 forks source link

Limits for autosuggest queries #7

Open adamgundry opened 2 years ago

adamgundry commented 2 years ago

At the moment, queryAutosuggest imposes limits on the number of documents considered, and returns no results if these are exceeded (this is unlike query which IIUC will return results if the limits are reached, it will merely stop considering more documents). At the very least, we should document the meaning of paramAutosuggestPrefilterLimit and paramAutosuggestPostfilterLimit.

For debugging search issues with a production dataset, it would be helpful if (a variant of) queryAutosuggest returned an explicit indication whether the query actually had no results or whether it hit a specific limit.

adamgundry commented 1 year ago

See also #13. Prior to that, autosuggest queries could compute unions/intersections of very large document ID sets even before the pre-filter limit was enforced.