Tag Archives: non ok status: 413

[Solved] Solr Error: non ok status: 413, message:FULL head,

Solr search engine is used in the project. When too many FQ filtering conditions are found, the query will report an exception, non OK status: 413, message: full head. This exception is caused by too many conditions during the query, resulting in insufficient head of the request

Solution: new httpsolrclient(). Query(), which is a get request by default. The number of conditions that a get request can carry is relatively small. It needs to be specified as a post request, that is, new httpsolrclient(). Query (query, solrrequest. Method. Post). In this way, the number of requests is relatively large. If it is not enough, the configuration file of Solr needs to be modified. The file path is solr-5.1.0/server/solr/configsets/, The & lt; maxBooleanClauses> 1024</ maxBooleanClauses> Attribute, increase 1024 to