Resolve HTTP 400 errors from oversized search query URLs in Fusion 5.x
Summary
Search requests can fail with HTTP 400 errors when the query is sent as a GET and the request line/headers (the query URL, including a long q, many fq filters, boosts, or other parameters) exceed the maximum request-header size that Jetty allows. Smaller queries succeed because they stay under the limit. This is a built-in Jetty setting that bounds the size of GET request headers.
Symptom
- Certain searches from the application return HTTP 400 while shorter searches on the same profile/pipeline succeed.
- The requests are issued as GET, and the failing ones carry unusually long URL query strings.
Root cause
A Fusion query request passes through multiple components, each of which enforces its own request/header-size limit in front of Solr:
- The API gateway
- The query pipeline / query service (Jetty)
- Solr (Jetty)
A long GET query URL is rejected with a 400 by the first component whose limit it exceeds.
Recommended fix: use POST instead of GET
Fusion's query endpoints accept POST as well as GET. With POST, the query parameters travel in the request body instead of the URL, so they are not subject to any URL/header-length limit at any component. The query profile endpoint documentation recommends using POST for longer parameter lists.
Switching the application's long-query calls to POST avoids the header-size limit entirely and is the recommended solution. Because this is an application change, test it in a lower environment before rolling it out to production.