title: length issues with solr select POST with cURL in PHP
body: <p>I have a solr query that has been working perfectly:</p>
  
  <pre><code>$ch             = curl_init();
  $ch_searchURL   = "$base_url/$collection/select?q=$s&amp;wt=json&amp;indent=true";
  
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);        
  curl_setopt($ch, CURLOPT_URL, $ch_searchURL);
  $rawData = curl_exec($ch);
  $json = json_decode($rawData,true);
  </code></pre>
  
  <p>Initially, my <code>$s</code> variable was literally one thing: e.g.  <code>?q=name:brian</code>, but my user base wanted the ability to search multiple things at once, so I started to build that in:</p>
  
  <pre><code>?q=name:("brian"+OR+"mike"+OR+"james"+OR+"emma"+OR+"luke") 
  </code></pre>
  
  <p>It then got to the point where they wanted to search 5,000 things at once, which caused this method of building out the solr GET query to fail as the literal URL length was longer than the max allowed length of ~2,000, so I thought using a POST might work, which I accomplished by adding the following lines:</p>
  
  <pre><code>$ch_searchURL   = "$base_url/$collection/select";
  $multiline_q    = "q=$s&amp;wt=json&amp;indent=true";
  curl_setopt($ch, CURLOPT_POSTFIELDS, $multline_q);
  </code></pre>
  
  <p>This seemed to allow me to search for around 500 items at a time - <em>(which would still, in GET world, cause a URL length of around 4,000)</em> - so better than the GET method, but once I go past that number of items, the solr query fails again.</p>
  
  <p>Because I'm POSTing <em>(maybe?)</em>, I don't get any error response from solr, so I don't know what's causing the query to fail, and I can't manually test the query in the browser because it's ~40,000 characters long and won't paste.  If I do <code>var_dump($rawData);</code>, I see this:</p>
  
  <pre><code>string(238) " 05 " // or 04, or 08
  </code></pre>
  
  <p>I've used solr quite a bit with PHP &amp; cURL, but <em>always</em> with the GET method.  This is my first foray into using POST.  Am I doing something wrong here?  Am I just exceeding the actual amount of <code>q</code> options that I can ask solr to retrieve for me, regardless of the method?</p>
  
  <p>Any light that anyone could shed on this would be helpful...</p>