You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Suneeta Mall (JIRA)" <ji...@apache.org> on 2014/01/18 22:58:19 UTC

[jira] [Updated] (SOLR-5639) Return type parameter 'wt' is completely ignored when url is html escaped

     [ https://issues.apache.org/jira/browse/SOLR-5639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suneeta Mall updated SOLR-5639:
-------------------------------

    Description: 
Querying solr with 'wt' parameter formats the result type as requested which works fine except when url is html escaped.

For example: 
http://localhost:8983/solr/suggest?q=Status:ac&amp;wt=json&indent=true
the response I get is :
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">1</int>
</lst>
<lst name="spellcheck">
  <lst name="suggestions">
    <lst name="ac">
      <int name="numFound">5</int>
      <int name="startOffset">7</int>
      <int name="endOffset">9</int>
      <arr name="suggestion">
        <str>acknowledged</str>
        <str>ack</str>
        <str>actual</str>
        <str>actually</str>
        <str>access</str>
      </arr>
    </lst>
    <str name="collation">Status:acknowledged</str>
  </lst>
</lst>
</response>

whereas the correct response should be:

{
  "responseHeader":{
    "status":0,
    "QTime":1},
  "spellcheck":{
    "suggestions":[
      "ac",{
        "numFound":5,
        "startOffset":7,
        "endOffset":9,
        "suggestion":["acknowledged",
          "ack",
          "actual",
          "actually",
          "access"]},
      "collation","Status:acknowledged"]}}


This causes severe problem when solr is integrated with GWT client where embedded script often encode url as per http encoding and ends up failing with timeout exception. Specially noticeable solr JSONP queries. for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true&json.wrf=xyz when it returns xml instead of json. 

 Noticeably other arguments works perfectly fine for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true.

  was:
Querying solr with 'wt' parameter formats the result type as requested which works fine except when url is http escaped.

For example: 
http://localhost:8983/solr/suggest?q=Status:ac&amp;wt=json&indent=true
the response I get is :
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">1</int>
</lst>
<lst name="spellcheck">
  <lst name="suggestions">
    <lst name="ac">
      <int name="numFound">5</int>
      <int name="startOffset">7</int>
      <int name="endOffset">9</int>
      <arr name="suggestion">
        <str>acknowledged</str>
        <str>ack</str>
        <str>actual</str>
        <str>actually</str>
        <str>access</str>
      </arr>
    </lst>
    <str name="collation">Status:acknowledged</str>
  </lst>
</lst>
</response>

whereas the correct response should be:

{
  "responseHeader":{
    "status":0,
    "QTime":1},
  "spellcheck":{
    "suggestions":[
      "ac",{
        "numFound":5,
        "startOffset":7,
        "endOffset":9,
        "suggestion":["acknowledged",
          "ack",
          "actual",
          "actually",
          "access"]},
      "collation","Status:acknowledged"]}}


This causes severe problem when solr is integrated with GWT client where embedded script often encode url as per http encoding and ends up failing with timeout exception. Specially noticeable solr JSONP queries. for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true&json.wrf=xyz when it returns xml instead of json. 

 Noticeably other arguments works perfectly fine for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true.


> Return type parameter 'wt' is completely ignored when url is html escaped
> -------------------------------------------------------------------------
>
>                 Key: SOLR-5639
>                 URL: https://issues.apache.org/jira/browse/SOLR-5639
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers, SearchComponents - other
>    Affects Versions: 4.5.1
>         Environment: Ubuntu 13.04, 
> Browser Chrome 
>            Reporter: Suneeta Mall
>
> Querying solr with 'wt' parameter formats the result type as requested which works fine except when url is html escaped.
> For example: 
> http://localhost:8983/solr/suggest?q=Status:ac&amp;wt=json&indent=true
> the response I get is :
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader">
>   <int name="status">0</int>
>   <int name="QTime">1</int>
> </lst>
> <lst name="spellcheck">
>   <lst name="suggestions">
>     <lst name="ac">
>       <int name="numFound">5</int>
>       <int name="startOffset">7</int>
>       <int name="endOffset">9</int>
>       <arr name="suggestion">
>         <str>acknowledged</str>
>         <str>ack</str>
>         <str>actual</str>
>         <str>actually</str>
>         <str>access</str>
>       </arr>
>     </lst>
>     <str name="collation">Status:acknowledged</str>
>   </lst>
> </lst>
> </response>
> whereas the correct response should be:
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":1},
>   "spellcheck":{
>     "suggestions":[
>       "ac",{
>         "numFound":5,
>         "startOffset":7,
>         "endOffset":9,
>         "suggestion":["acknowledged",
>           "ack",
>           "actual",
>           "actually",
>           "access"]},
>       "collation","Status:acknowledged"]}}
> This causes severe problem when solr is integrated with GWT client where embedded script often encode url as per http encoding and ends up failing with timeout exception. Specially noticeable solr JSONP queries. for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true&json.wrf=xyz when it returns xml instead of json. 
>  Noticeably other arguments works perfectly fine for example: http://localhost:8983/solr/suggest?q=Status:ac&wt=json&amp;indent=true.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org