atuljangra
atuljangra

Reputation: 457

Solr POST Request returns 400. Java. When size of request is too large

I'm sending a query to solr using POST request. Everything works well. There is a scenario when I've to send some string in the filter query like:

fq=id:("id1""id2""id3")

When the length of the filter query is above a certain threshold, I keep getting Err 400: Bad Request.

This error is coming form the underlying Jetty server above the solr that I'm using.

What is the workaround for this? Should I be increasing the size of the post request body in Jetty?

Thanks!

Upvotes: 0

Views: 2151

Answers (1)

Abhijit Bashetti
Abhijit Bashetti

Reputation: 8668

Increase the below value and try...

<maxBooleanClauses>1024</maxBooleanClauses>

This sets the maximum number of clauses allowed in a boolean query. This can affect range or prefix queries that expand to a query with a large number of boolean terms. If this limit is exceeded, an exception is thrown.

for more info check

https://cwiki.apache.org/confluence/display/solr/Query+Settings+in+SolrConfig

Upvotes: 1

Related Questions