You can usually raise the header size limit by editing the config of
your servlet container. That can only get you so far though, and
different browsers have their own limits.
Your best bet, as Lance said, is either posting or sticking them in
solconfig.
You can post by using the query(SolrParams params, METHOD method) method.
Just use METHOD.POST. The default is METHOD.GET.
--
- Mark
http://www.lucidimagination.com
On 03/13/2010 06:23 PM, Lance Norskog wrote:
It is usually a limitation in the servlet container. You could try
using embedded Solr or using an HTTP POST instead of an HTTP GET.
However, in this case it is probably not possible.
If these long filter queries never change, you could embed these in
the solrconfig.xml declaration for a request handler. That way, they
don't get parsed by the HTTP parser.
2010/3/10 Krantiā¢ K K Parisa<kranti.par...@gmail.com>:
Hi,
I am trying to test the SOLR search with very big query.. sample code
snippet is as follows. when I try that its throwing exceptions.
Is SOLR query has any limitations with size or length..etc??
=========================================================
solrServer = SolrUtils.getSolrServerTest("http://localhost:8080/solr-tag
");
StringBuffer strFq = new StringBuffer("&fq=(");
SolrQuery q = new SolrQuery("*:*");
int intStart = 934051;
for(int m=intStart;m<(intStart+500);m++){
strFq.append("fieldname:" + m + " OR ");
}
strFq.replace(strFq.lastIndexOf(" OR "), strFq.length() - 1, "");
strFq.append(")");
q.addFilterQuery(strFq.toString());
QueryResponse res = solrServer.query(q);
System.out.println("response=========="+res.getResponse());
==========================================================
but getting the following exception
Exception in thread "main" org.apache.solr.client.solrj.SolrServerException:
java.net.SocketException: Software caused connection abort: recv failed
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:472)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
at com.getset.inre.test.IndexTest.testTagIndex(IndexTest.java:311)
at com.getset.inre.test.IndexTest.main(IndexTest.java:330)
Caused by: java.net.SocketException: Software caused connection abort: recv
failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:416)
... 5 more
=============================================
Best Regards,
Kranti K K Parisa