spell-check does not return collations when using search query with filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

spell-check does not return collations when using search query with filter

Arnold Bronley
When 'polt' is passed as keyword, both suggestions and collations
parameters are returned. But if I pass 'tag:polt' as search query then only
suggestions parameter is returned. Is this a bug?
Reply | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

alessandro.benedetti
Does spellcheck.q=polt help ?
How your queries normally look ?
How would you like the collation to be returned ?



-----
---------------
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
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
Reply | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

Arnold Bronley
Thanks for replying. I tried spellcheck.q=polt  and it does not help.

Here is how the query looks like:
http://solr:8983/solr/myapp/select?q=tag:polt&wt=json&indent=true&spellcheck=true&spellcheck.count=7&spellcheck.onlyMorePopular=true&spellcheck.extendedResults=true&spellcheck.collate=true&spellcheck.maxCollations=3&spellcheck.maxCollationTries=3&spellcheck.collateExtendedResults=true

One workaround I found was that if you pass in \ before polt i.e. tag:\polt
then it works as expected and collations object is included in the json
response. I definitely think that this is a bug unless I am missing some
obvious thing here.

On Mon, Oct 9, 2017 at 9:45 AM, alessandro.benedetti <[hidden email]>
wrote:

> Does spellcheck.q=polt help ?
> How your queries normally look ?
> How would you like the collation to be returned ?
>
>
>
> -----
> ---------------
> 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 | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

alessandro.benedetti
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
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
Reply | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

Arnold Bronley
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 <[hidden email]>
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 | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

Arnold Bronley
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 <[hidden email]>
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 <
> [hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

alessandro.benedetti
In reply to this post by Arnold Bronley
But you used :

"spellcheck.q": "tag:polt",

Instead of :
"spellcheck.q": "polt",

Regards



-----
---------------
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
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
Reply | Threaded
Open this post in threaded view
|

Re: spell-check does not return collations when using search query with filter

Arnold Bronley
I tried spellcheck.q=polt and q=tag:polt. I get collations, but they are
only for polt and not tag:polt. Because of that, the hits that I get back
are for frequency of plot and not frequency of tag:plot

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

    ]
  },
  "spellcheck": {
    "suggestions": [
      "polt",
      {
        "numFound": 7,
        "startOffset": 0,
        "endOffset": 4,
        "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": "plot",
        "hits": 10538,
        "misspellingsAndCorrections": [
          "polt",
          "plot"
        ]
      },
      "collation",
      {
        "collationQuery": "port",
        "hits": 754,
        "misspellingsAndCorrections": [
          "polt",
          "port"
        ]
      },
      "collation",
      {
        "collationQuery": "post",
        "hits": 626,
        "misspellingsAndCorrections": [
          "polt",
          "post"
        ]
      }
    ]
  }
}

On Tue, Oct 17, 2017 at 5:01 AM, alessandro.benedetti <[hidden email]>
wrote:

> But you used :
>
> "spellcheck.q": "tag:polt",
>
> Instead of :
> "spellcheck.q": "polt",
>
> Regards
>
>
>
> -----
> ---------------
> 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
>