[
https://issues.apache.org/jira/browse/SOLR-12543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Varun Thacker updated SOLR-12543:
---------------------------------
Description:
If I do a wrong export query like this we get back http code 200
{code:java}
~/solr-7.4.0$ curl -v "http://localhost:8983/solr/gettingstarted/export/?q=*:*"
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8983 (#0)
> GET /solr/gettingstarted/export/?q=*:* HTTP/1.1
> Host: localhost:8983
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: json
< Transfer-Encoding: chunked
<
{
"responseHeader":{"status":400},
"response":{
"numFound":0,
* Connection #0 to host localhost left intact
"docs":[{"EXCEPTION":"org.apache.solr.search.SyntaxError: No sort criteria was
provided."}]}}
{code}
For reference if I do a bad solr query like this we get back a HTTP 400
{code:java}
~/solr-7.4.0$ curl -v http://localhost:8983/solr/gettingstarted/query/?q=a:a
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8983 (#0)
> GET /solr/gettingstarted/query/?q=a:a HTTP/1.1
> Host: localhost:8983
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Cache-Control: no-cache, no-store
< Pragma: no-cache
< Expires: Sat, 01 Jan 2000 01:00:00 GMT
< Last-Modified: Mon, 09 Jul 2018 13:12:51 GMT
< ETag: "1647f2c5e7e"
< Content-Type: text/plain;charset=utf-8
< Content-Length: 317
<
{
"responseHeader":{
"zkConnected":true,
"status":400,
"QTime":1,
"params":{
"q":"a:a"}},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"undefined field a",
"code":400}}
* Connection #0 to host localhost left intact{code}
was:
If I do a wrong export query like this
{code:java}
~/solr-7.4.0$ curl -v "http://localhost:8983/solr/gettingstarted/export/?q=*:*"
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8983 (#0)
> GET /solr/gettingstarted/export/?q=*:* HTTP/1.1
> Host: localhost:8983
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: json
< Transfer-Encoding: chunked
<
{
"responseHeader":{"status":400},
"response":{
"numFound":0,
* Connection #0 to host localhost left intact
"docs":[{"EXCEPTION":"org.apache.solr.search.SyntaxError: No sort criteria was
provided."}]}}
{code}
We get back a http code of 200
For reference if I do a bad solr query like this we get back a HTTP 400
{code:java}
~/solr-7.4.0$ curl -v http://localhost:8983/solr/gettingstarted/query/?q=a:a
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8983 (#0)
> GET /solr/gettingstarted/query/?q=a:a HTTP/1.1
> Host: localhost:8983
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Cache-Control: no-cache, no-store
< Pragma: no-cache
< Expires: Sat, 01 Jan 2000 01:00:00 GMT
< Last-Modified: Mon, 09 Jul 2018 13:12:51 GMT
< ETag: "1647f2c5e7e"
< Content-Type: text/plain;charset=utf-8
< Content-Length: 317
<
{
"responseHeader":{
"zkConnected":true,
"status":400,
"QTime":1,
"params":{
"q":"a:a"}},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"undefined field a",
"code":400}}
* Connection #0 to host localhost left intact{code}
> Export Handler errors come back with HTTP 200
> ---------------------------------------------
>
> Key: SOLR-12543
> URL: https://issues.apache.org/jira/browse/SOLR-12543
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Varun Thacker
> Priority: Major
>
> If I do a wrong export query like this we get back http code 200
> {code:java}
> ~/solr-7.4.0$ curl -v
> "http://localhost:8983/solr/gettingstarted/export/?q=*:*"
> * Trying ::1...
> * TCP_NODELAY set
> * Connected to localhost (::1) port 8983 (#0)
> > GET /solr/gettingstarted/export/?q=*:* HTTP/1.1
> > Host: localhost:8983
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> < Content-Type: json
> < Transfer-Encoding: chunked
> <
> {
> "responseHeader":{"status":400},
> "response":{
> "numFound":0,
> * Connection #0 to host localhost left intact
> "docs":[{"EXCEPTION":"org.apache.solr.search.SyntaxError: No sort criteria
> was provided."}]}}
> {code}
>
> For reference if I do a bad solr query like this we get back a HTTP 400
> {code:java}
> ~/solr-7.4.0$ curl -v http://localhost:8983/solr/gettingstarted/query/?q=a:a
> * Trying ::1...
> * TCP_NODELAY set
> * Connected to localhost (::1) port 8983 (#0)
> > GET /solr/gettingstarted/query/?q=a:a HTTP/1.1
> > Host: localhost:8983
> > User-Agent: curl/7.54.0
> > Accept: */*
> >
> < HTTP/1.1 400 Bad Request
> < Cache-Control: no-cache, no-store
> < Pragma: no-cache
> < Expires: Sat, 01 Jan 2000 01:00:00 GMT
> < Last-Modified: Mon, 09 Jul 2018 13:12:51 GMT
> < ETag: "1647f2c5e7e"
> < Content-Type: text/plain;charset=utf-8
> < Content-Length: 317
> <
> {
> "responseHeader":{
> "zkConnected":true,
> "status":400,
> "QTime":1,
> "params":{
> "q":"a:a"}},
> "error":{
> "metadata":[
> "error-class","org.apache.solr.common.SolrException",
> "root-error-class","org.apache.solr.common.SolrException"],
> "msg":"undefined field a",
> "code":400}}
> * Connection #0 to host localhost left intact{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]