search-relaxation-capped-at-50-queries

IN premise

FTS progressive relaxation drops terms via `combinations()` (largest subsets first) until results appear, capped at 50 total relaxation queries to prevent combinatorial explosion on long search strings.

Summary

The full-text search system handles queries that are too specific by progressively removing search terms, trying the largest possible subsets first to stay as close to the original query as possible. To avoid performance problems when someone searches for a very long phrase, it stops trying after 50 relaxation attempts — without this cap, a query with many words could generate thousands of subset combinations and bog down the system.

Details

Sourceentries/2026/05/05/reasons_lib-api.md