[ 
https://issues.apache.org/jira/browse/SOLR-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668745#action_12668745
 ] 

Karl Wettin commented on SOLR-839:
----------------------------------

There seems to be a bug here somewhere. As the xml query hit 6-7 kb data or 
60-70 clauses i start getting connection resets. If I switch to 
BoostingTermQuery then it seems to indicate it has to do with the amount of xml 
data and not to do with number of clauses. I get nothing in my Solr log about 
this failing request. 

{code:java}
    SolrQuery solrQuery = new SolrQuery();
    solrQuery.add("fl", "score");
    solrQuery.add("defType", "xml");

    StringBuilder xml = new StringBuilder(10000);
    xml.append("<BooleanQuery 
fieldName=\"").append(FieldNames.shingles).append("\">");

    for (int i = 0; i < 10000; i++) {
      xml.append("<Clause occurs=\"should\">");
      xml.append("<TermQuery boost=\"1.0\">");
      xml.append("foo");
      xml.append("</TermQuery>");
      xml.append("</Clause>");

      solrQuery.setQuery(xml.toString() + "</BooleanQuery>");

      System.out.println(i + "\t" + solrQuery.getQuery().length());
      
      try {
        SearchService.getInstance().getSolr().query(solrQuery);
      } catch (SolrServerException e) {
        if (e.getCause() != null && e.getCause().getCause() != null && 
e.getCause().getCause() instanceof java.net.SocketException) {
          throw e;
        }
      }
    }

{code}

{code}
0       121
1       192
2       263
3       334
4       405
5       476
6       547
7       618
8       689
9       760
10      831
11      902
12      973
13      1044
14      1115
15      1186
16      1257
17      1328
18      1399
19      1470
20      1541
21      1612
22      1683
23      1754
24      1825
25      1896
26      1967
27      2038
28      2109
29      2180
30      2251
31      2322
32      2393
33      2464
34      2535
35      2606
36      2677
37      2748
38      2819
39      2890
40      2961
41      3032
42      3103
43      3174
44      3245
45      3316
46      3387
47      3458
48      3529
49      3600
50      3671
51      3742
52      3813
53      3884
54      3955
55      4026
56      4097
57      4168
58      4239
59      4310
60      4381
61      4452
62      4523
63      4594
64      4665
65      4736
66      4807
67      4878
68      4949
69      5020
70      5091
71      5162
72      5233
73      5304
74      5375
75      5446
76      5517
2097 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - I/O 
exception (org.apache.commons.httpclient.NoHttpResponseException) caught when 
processing request: The server localhost failed to respond
2098 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - Retrying 
request
2100 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - I/O 
exception (org.apache.commons.httpclient.NoHttpResponseException) caught when 
processing request: The server localhost failed to respond
2100 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - Retrying 
request
2102 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - I/O 
exception (org.apache.commons.httpclient.NoHttpResponseException) caught when 
processing request: The server localhost failed to respond
2102 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - Retrying 
request
77      5588
2108 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - I/O 
exception (org.apache.commons.httpclient.NoHttpResponseException) caught when 
processing request: The server localhost failed to respond
2109 [main] INFO  org.apache.commons.httpclient.HttpMethodDirector  - Retrying 
request

org.apache.solr.client.solrj.SolrServerException: Error executing query
        at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:96)
        at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
        at se.hundraartonetthundra.TestSearch.test(TestSearch.java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at com.intellij.rt.junit4.Junit4ClassSuite.run(Junit4ClassSuite.java:99)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
Caused by: org.apache.solr.client.solrj.SolrServerException: 
java.net.SocketException: Connection reset
        at 
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:391)
        at 
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:183)
        at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
        ... 22 more
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
        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:335)
        ... 24 more


{code}

> XML Query Parser support
> ------------------------
>
>                 Key: SOLR-839
>                 URL: https://issues.apache.org/jira/browse/SOLR-839
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Erik Hatcher
>            Assignee: Erik Hatcher
>             Fix For: 1.4
>
>         Attachments: lucene-xml-query-parser-2.4-dev.jar, SOLR-839.patch
>
>
> Lucene contrib includes a query parser that is able to create the 
> full-spectrum of Lucene queries, using an XML data structure.
> This patch adds "xml" query parser support to Solr.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to