With q instead of spellcheck.q I get following response:

{
  "responseHeader": {
    "status": 0,
    "QTime": 23,
    "params": {
      "q": "tag:polt",
      "spellcheck.collateExtendedResults": "true",
      "indent": "true",
      "spellcheck": "true",
      "spellcheck.accuracy": "0.72",
      "spellcheck.maxCollations": "3",
      "spellcheck.onlyMorePopular": "true",
      "spellcheck.count": "7",
      "spellcheck.maxCollationTries": "3",
      "wt": "json",
      "spellcheck.extendedResults": "true",
      "spellcheck.collate": "true"
    }
  },
  "response": {
    "numFound": 0,
    "start": 0,
    "docs": [

    ]
  },
  "spellcheck": {
    "suggestions": [
      "polt",
      {
        "numFound": 7,
        "startOffset": 3,
        "endOffset": 8,
        "origFreq": 0,
        "suggestion": [
          {
            "word": "plot",
            "freq": 5934
          },
          {
            "word": "port",
            "freq": 495
          },
          {
            "word": "post",
            "freq": 233
          },
          {
            "word": "poly",
            "freq": 216
          },
          {
            "word": "pole",
            "freq": 175
          },
          {
            "word": "poll",
            "freq": 12
          },
          {
            "word": "polm",
            "freq": 9
          }
        ]
      }
    ],
    "correctlySpelled": false,
    "collations": [

    ]
  }
}


with q and using the workaround that I mentioned, I get proper response as
follows (Note that I passed tag:\polt to q but in responseHeader, it shows
the escaped version i.e. tag:\\polt):

{
  "responseHeader": {
    "status": 0,
    "QTime": 20,
    "params": {
      "q": "tag:\\polt",
      "spellcheck.collateExtendedResults": "true",
      "indent": "true",
      "spellcheck": "true",
      "spellcheck.accuracy": "0.72",
      "spellcheck.maxCollations": "3",
      "spellcheck.onlyMorePopular": "true",
      "spellcheck.count": "7",
      "spellcheck.maxCollationTries": "3",
      "wt": "json",
      "spellcheck.extendedResults": "true",
      "spellcheck.collate": "true"
    }
  },
  "response": {
    "numFound": 0,
    "start": 0,
    "docs": [

    ]
  },
  "spellcheck": {
    "suggestions": [
      "polt",
      {
        "numFound": 7,
        "startOffset": 4,
        "endOffset": 9,
        "origFreq": 0,
        "suggestion": [
          {
            "word": "plot",
            "freq": 5934
          },
          {
            "word": "port",
            "freq": 495
          },
          {
            "word": "post",
            "freq": 233
          },
          {
            "word": "poly",
            "freq": 216
          },
          {
            "word": "pole",
            "freq": 175
          },
          {
            "word": "poll",
            "freq": 12
          },
          {
            "word": "polm",
            "freq": 9
          }
        ]
      }
    ],
    "correctlySpelled": false,
    "collations": [
      "collation",
      {
        "collationQuery": "tag:plot",
        "hits": 703,
        "misspellingsAndCorrections": [
          "polt",
          "plot"
        ]
      },
      "collation",
      {
        "collationQuery": "tag:port",
        "hits": 8,
        "misspellingsAndCorrections": [
          "polt",
          "port"
        ]
      },
      "collation",
      {
        "collationQuery": "tag:post",
        "hits": 3,
        "misspellingsAndCorrections": [
          "polt",
          "post"
        ]
      }
    ]
  }

On Mon, Oct 16, 2017 at 3:00 PM, Arnold Bronley <arnoldbron...@gmail.com>
wrote:

> with spellcheck.q I don't get anything back at all.
>
> {
>   "responseHeader": {
>     "status": 0,
>     "QTime": 10,
>     "params": {
>       "spellcheck.collateExtendedResults": "true",
>       "spellcheck.q": "tag:polt",
>       "indent": "true",
>       "spellcheck": "true",
>       "spellcheck.accuracy": "0.72",
>       "spellcheck.maxCollations": "3",
>       "spellcheck.onlyMorePopular": "true",
>       "spellcheck.count": "7",
>       "spellcheck.maxCollationTries": "3",
>       "wt": "json",
>       "spellcheck.extendedResults": "true",
>       "spellcheck.collate": "true"
>     }
>   },
>   "response": {
>     "numFound": 0,
>     "start": 0,
>     "docs": [
>
>     ]
>   },
>   "spellcheck": {
>     "suggestions": [
>
>     ],
>     "correctlySpelled": false,
>     "collations": [
>
>     ]
>   }
> }
>
> On Mon, Oct 16, 2017 at 5:03 AM, alessandro.benedetti <
> a.benede...@sease.io> wrote:
>
>> Interesting, what happens when you pass it as spellcheck.q=polt ?
>> What is the behavior you get ?
>>
>>
>>
>>
>>
>> -----
>> ---------------
>> Alessandro Benedetti
>> Search Consultant, R&D Software Engineer, Director
>> Sease Ltd. - www.sease.io
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>
>

Reply via email to