Annotation Interface Spellcheck


@Retention(RUNTIME) @Target(METHOD) @Documented public @interface Spellcheck
Enable Solr spellcheck component for a repository query method.
Use SpellcheckedPage as method return to access suggestions.
Since:
2.1
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    float
    Specifies an accuracy value to be used by the spell checking implementation to decide whether a result is worthwhile or not.
    long
    The count of suggestions to return for each query term existing in the index and/or dictionary.
    boolean
    If set, Solr creates the dictionary that the SolrSpellChecker will use for spell-checking.
    boolean
    If set, Solr will take the best suggestion for each token (if one exists) and construct a new query from the suggestions.
    boolean
    Instructs Solr to return an expanded response format detailing the collations found.
    long
    Specifies the maximum number of spelling suggestions to be returned.
    This parameter causes Solr to use the dictionary named in the parameter's argument.
    boolean
    This parameter enables/disables the extended response format.
    long
    This parameter specifies the maximum number of documents that should be collect when testing potential collations against the index.
    long
    This parameter specifies the maximum number of word correction combinations to rank and evaluate prior to deciding which collation candidates to test against the index.
    long
    The maximum number of collations to return.
    long
    This parameter specifies the number of collation possibilities for Solr to try before giving up.
    long
    The maximum number of hits the request can return in order to both generate spelling suggestions and set the correctlySpelled element to false.
    boolean
    Limits spellcheck responses to queries that are more popular than the original query.
  • Element Details

    • count

      long count
      Specifies the maximum number of spelling suggestions to be returned.
      Returns:
      Default:
      -1L
    • dictionaries

      String[] dictionaries
      This parameter causes Solr to use the dictionary named in the parameter's argument. The default setting is "default". This parameter can be used to invoke a specific spellchecker on a per request basis.
      Returns:
      Default:
      {}
    • extendedResults

      boolean extendedResults
      This parameter enables/disables the extended response format. The default values is false. If enabled the response returns the document frequency for each suggestion and returns one suggestion block for each term in the query string.
      Returns:
      Default:
      false
    • maxResultsForSuggest

      long maxResultsForSuggest
      The maximum number of hits the request can return in order to both generate spelling suggestions and set the correctlySpelled element to false.
      Returns:
      Default:
      -1L
    • alternativeTermCount

      long alternativeTermCount
      The count of suggestions to return for each query term existing in the index and/or dictionary.
      Returns:
      Default:
      -1L
    • accuracy

      float accuracy
      Specifies an accuracy value to be used by the spell checking implementation to decide whether a result is worthwhile or not. The value is a float between 0 and 1.
      Returns:
      Default:
      -1.0f
    • onlyMorePopular

      boolean onlyMorePopular
      Limits spellcheck responses to queries that are more popular than the original query.
      Returns:
      Default:
      false
    • buildDictionary

      boolean buildDictionary
      If set, Solr creates the dictionary that the SolrSpellChecker will use for spell-checking.
      Returns:
      Default:
      false
    • collate

      boolean collate
      If set, Solr will take the best suggestion for each token (if one exists) and construct a new query from the suggestions.
      Returns:
      Default:
      false
    • maxCollations

      long maxCollations
      The maximum number of collations to return.
      Returns:
      Default:
      -1L
    • maxCollationsTries

      long maxCollationsTries
      This parameter specifies the number of collation possibilities for Solr to try before giving up.
      Returns:
      Default:
      -1L
    • maxCollationEvaluations

      long maxCollationEvaluations
      This parameter specifies the maximum number of word correction combinations to rank and evaluate prior to deciding which collation candidates to test against the index.
      Returns:
      Default:
      -1L
    • maxCollationCollectDocs

      long maxCollationCollectDocs
      This parameter specifies the maximum number of documents that should be collect when testing potential collations against the index.
      Returns:
      Default:
      -1L
    • collateExtendedResults

      boolean collateExtendedResults
      Instructs Solr to return an expanded response format detailing the collations found.
      Returns:
      Default:
      false