Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8208933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:32:30+00:00 2026-06-07T09:32:30+00:00

I am working on an application that requires me to use Solr for the

  • 0

I am working on an application that requires me to use Solr for the first time. I got it set up, indexing the correct data, and querying as I would like it, but I cannot seem to get the spellcheck component working properly. No matter what I query, the spellchecker will not return any suggestions. I have included the relevant parts of my solrconfig and schema.xml.

schema.xml

<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" omitNorms="true">
  <analyzer type="index">
    <charFilter class="solr.HTMLStripCharFilterFactory"/>
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.StandardFilterFactory"/>
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"  expand="true"/>
    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.StandardFilterFactory"/>
  </analyzer>
</fieldType>

<!-- CUT -->

<field name="spell" type="textSpell" indexed="true" stored="true" />

solrconfig.xml

<requestHandler name="/select" class="solr.SearchHandler">
   <lst name="defaults">
     <str name="defType">edismax</str>
     <str name="spellcheck.dictionary">default</str>
     <str name="spellcheck.onlyMorePopular">false</str>
     <!-- <str name="spellcheck.extendedResults">false</str> -->
     <str name="spellcheck.count">3</str>

    <str name="qf">
      frontlist_flapcopy^0.5 title^2.0  subtitle^1.0 series^1.5 author^3.0 frontlist_ean^6.0
    </str>
    <str name="pf">
      frontlist_flapcopy^0.5 title^2.0  subtitle^1.0 series^1.5 author^3.0 frontlist_ean^6.0
    </str>
    <str name="fl">
      title,subtitle,series,author,eans,formats,prices,frontlist_ean,onsaledate,imprint,frontlist_flapcopy
    </str>
    <str name="mm">
      2&lt;-1 5&lt;-2 6&lt;90%
    </str>
    <int name="ps">100</int>
    <bool name="hl">true</bool>
    <str name="q.alt">*:*</str>
    <str name="hl.fl">title,subtitle,series,author,frontlist_flapcopy</str>
    <str name="f.title.hl.fragsize">0</str>
    <str name="f.title.hl.alternateField">title</str>
    <str name="f.subtitle.hl.fragsize">0</str>
    <str name="f.subtitle.hl.alternateField">url</str>
    <str name="f.series.hl.fragsize">0</str>
    <str name="f.series.hl.alternateField">url</str>
    <str name="f.author.hl.fragsize">0</str>
    <str name="f.author.hl.alternateField">url</str>
    <str name="f.frontlist_flapcopy.hl.fragsize">0</str>
    <str name="f.frontlist_flapcopy.hl.alternateField">url</str>

    <str name="echoParams">explicit</str>
    <float name="accuracy">0.7</float>
   </lst>

   <lst name="appends">
       <str name="fq">forsaleinusa:true</str>
   </lst>
   <arr name="last-components">
      <str>spellcheck</str>
   </arr>
</requestHandler>

<!-- CUT -->

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <lst name="spellchecker">
    <str name="name">default</str>
    <str name="classname">solr.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="spellcheckIndexDir">/path/to/my/spell/index</str>
    <str name="accuracy">0.7</str>
    <float name="thresholdTokenFrequency">.0001</float>
  </lst>

  <lst name="spellchecker">
    <str name="name">jarowinkler</str>
    <str name="classname">solr.IndexBasedSpellChecker</str>
    <str name="field">spell</str>
    <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
    <str name="spellcheckIndexDir">/path/to/my/spell/index</str>
  </lst>

  <str name="queryAnalyzerFieldType">textSpell</str>
</searchComponent>

When I go to http://localhost:8983/solr/select/?q=query&spellcheck.build=true then look at the files generated in /path/to/my/spell/index, there is a segments.gen and a segments_1, both of which contain only a few bytes of binary data. Then, when I enter a query and append &spellcheck=true to the query string, I get no suggestions, no matter my query:

<lst name="spellcheck">
  <lst name="suggestions"/>
</lst>

Any idea what is going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:32:34+00:00Added an answer on June 7, 2026 at 9:32 am

    I ended up resolving this issue a while ago, but to my recollection, the issue was that I was using multiple <copyField/> directives to copy data to the “spell” field, but I did not set multiValued="true" on that field. When I made the spellcheck field multivalued, it worked like a charm!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a GWT application that requires report printing. The use
This is the first time I am working for a front-end project that requires
I am working on an iPhone application that requires the use of a third
I'm working on an application that requires the use of both JPA/Hibernate and RMI.
im working on an application that requires me to use a Long Double variable,
I am currently working on an application that requires the use of a WebView.
Where currently working on an C# application that requires data to be stored in
Am currently working on an application that requires users to submit posts and comments
I am working on an application that requires text larger than the viewable screen
I'm working on an application that requires support for forward locking of media files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.