So I have a SOLR query with the following fq filter param:
(field_name:(1 OR 2 OR 25 OR 33 OR 333 OR 32 OR ...... and 2000 other ORS))
So Solr has this maximum boolean limit:
<maxBooleanClauses>1024</maxBooleanClauses>
Hence I have no choice but to split this query and try to combine the result from the split queries. Moreover I'm paginating the results so I'm only interested in the first 10 documents of the matches as well a total count of of all the results.
The problem is...the search object has one to many relation with the field_name attribute. Hence a solr document could have multiple field_name values .... Now in the original query, this will all be nicely resolved with SOLR OR statements....however, if I separate the ORs and then execute 3 separate queries, due to this one to many relation, certain documents would get returned by multiple queries. Hence I can't just add the numResult for each query to get the actual aggregate numResult and moreover the returned documents would often get returned by multiple queries
How can I resolve this dilemma, how can I manipulate this so that I get the same result (same documents returned, with same total numresult) with the original unsplit query after splitting this into 3 separate queries
maxBooleanClauses
? Also use a POST request so the data gets thru to the server. – arun