Solr
  1. Solr
  2. SOLR-3447

solrj cannot handle org.apache.solr.common.SolrException when the schema is not correct

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.6
    • Fix Version/s: 3.6
    • Component/s: clients - java
    • Labels:
      None
    • Environment:

      jdk 1.6.0_26, tomcat 6.0.35 , solrj 3.6.0 solr-core 3.6.0 and solr.war (4.0)

      Description

      Hi;

      I have an incorrect schema, a missing field :

      and when I add a documents (UpdateResponse ur = solrServer.add(docs), I have not be able to catch exception in solrj and the UpdateResponse cannot handle result.

      Best Regards

      – Jamel ESSOUSSI

        Activity

        Hide
        ESSOUSSI Jamel added a comment -

        Hi,

        When the schema is not valid and I try to index solr document I get this response from solr:

        HTTP/1.1 400 Mauvaise Requ.te
        Server: Apache-Coyote/1.1
        Content-Type: text/html;charset=utf-8
        Content-Length: 1125
        Date: Thu, 10 May 2012 16:00:00 GMT
        Connection: close

        <html><head><title>Apache Tomcat/6.0.28 - Rapport d'erreur</title><style><!--H1

        {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

        H2

        {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

        H3

        {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

        BODY

        {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

        B

        {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

        P

        {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

        A

        {color : black;}

        A.name

        {color : black;}

        HR

        {color : #525D76;}

        --></style> </head><body><h1>Etat HTTP 400 - ERROR: [doc=280304571883] unknown field 'shop_'</h1><HR size="1" noshade="noshade"><p><b>type</b> Rapport d'..tat</p><p><b>message</b> <u>ERROR: [doc=280304571883] unknown field 'shop_'</u></p><p><b>description</b> <u>La requ..te envoy..e par le client ..tait syntaxiquement incorrecte (ERROR: [doc=280304571883] unknown field 'shop_').</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.28</h3></body></html>

        And when the schema is valid, I get this response :

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/xml;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Thu, 10 May 2012 15:53:09 GMT

        93
        <?xml version="1.0" encoding="UTF-8"?>
        <response>
        <lst name="responseHeader"><int name="status">0</int><int name="QTime">3</int></lst>
        </response>

        --> Is that it is normal that the result eq 0 when the schema is good.
        --> and if the schema is not good, why solrj is not capable of handling solrexception

        Best Reagards

        – Jamel ESSOUSSI

        Show
        ESSOUSSI Jamel added a comment - Hi, When the schema is not valid and I try to index solr document I get this response from solr: HTTP/1.1 400 Mauvaise Requ.te Server: Apache-Coyote/1.1 Content-Type: text/html;charset=utf-8 Content-Length: 1125 Date: Thu, 10 May 2012 16:00:00 GMT Connection: close <html><head><title>Apache Tomcat/6.0.28 - Rapport d'erreur</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} A {color : black;} A.name {color : black;} HR {color : #525D76;} --></style> </head><body><h1>Etat HTTP 400 - ERROR: [doc=280304571883] unknown field 'shop_'</h1><HR size="1" noshade="noshade"><p><b>type</b> Rapport d'..tat</p><p><b>message</b> <u>ERROR: [doc=280304571883] unknown field 'shop_'</u></p><p><b>description</b> <u>La requ..te envoy..e par le client ..tait syntaxiquement incorrecte (ERROR: [doc=280304571883] unknown field 'shop_').</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.28</h3></body></html> And when the schema is valid, I get this response : HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Thu, 10 May 2012 15:53:09 GMT 93 <?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">3</int></lst> </response> --> Is that it is normal that the result eq 0 when the schema is good. --> and if the schema is not good, why solrj is not capable of handling solrexception Best Reagards – Jamel ESSOUSSI

          People

          • Assignee:
            Unassigned
            Reporter:
            ESSOUSSI Jamel
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development