Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8934

Spellchecker collaction should return in popular order

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 5.5.1
    • None
    • spellchecker
    • None

    Description

      From what I understand solr execute queries to determine if the suggest return results.
      https://cwiki.apache.org/confluence/display/solr/Spell+Checking#SpellChecking-Thespellcheck.collateParameter

      The spellcheck.collate parameter only returns collations that are guaranteed to result in hits if re-queried, even when applying original fq parameters.
      it would be great if solr will order the collations by numFound, so the collations with more results appear first.

      i.e:
      spellcheck.q = prditive analytiycs
      spellcheck.maxCollations = 5
      spellcheck.count=0

      response:

      <lst name="spellcheck">
        <lst name="suggestions"/>
        <bool name="correctlySpelled">false</bool>
        <lst name="collations">
          <str name="collation">positive analytic</str>
          <str name="collation">positive analytics</str>
          <str name="collation">predictive analytics</str>
          <str name="collation">primitive analytics</str>
          <str name="collation">punitive analytic</str>
        </lst>
      </lst>
      

      Obviesly that "predictive analytics" have more results from "positive analytic".

      Attachments

        Activity

          People

            Unassigned Unassigned
            mikichi Michael Solomon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: