Hi Alessandro, I'm currently on Solr version 6.2.1, but will soon be moving to 6.6. I'm not using DirectSolrSpellcheck, but using Index and File based. The words I was testing against are definitely available in the File and possibly in the Index as well.
What I found was if I don't set the maxResultsForSuggest field, Solr would always try to spell correct. So for example, Searching for "nike", gets corrected to "bike", {"responseHeader":{"status":0,"QTime":2167,"params":{"spellcheck.q":"*nike* ","spellcheck":"true","wt":"json","spellcheck.build":"true","spellcheck.extendedResults":"true"}},"command":"build","response":{"numFound":0,"start":0,"docs":[]},"spellcheck":{"suggestions":["nike",{"numFound":1,"startOffset":0,"endOffset":4,"origFreq":0,"suggestion":[{"word":" *bike* ","freq":-1}]}],"correctlySpelled":false,"collations":["collation","bike"]}} But searching for "bike", gets corrected to "bake" {"responseHeader":{"status":0,"QTime":2048,"params":{"spellcheck.q":"*bike* ","spellcheck":"true","wt":"json","spellcheck.build":"true","spellcheck.extendedResults":"true"}},"command":"build","response":{"numFound":0,"start":0,"docs":[]},"spellcheck":{"suggestions":["bike",{"numFound":1,"startOffset":0,"endOffset":4,"origFreq":0,"suggestion":[{"word":" *bake* ","freq":-1}]}],"correctlySpelled":false,"collations":["collation","bake"]}} On Mon, Nov 13, 2017 at 10:43 AM, alessandro.benedetti <a.benede...@sease.io > wrote: > Which Solr version are you using ? > > From the documentation : > "Only query words, which are absent in index or too rare ones (below > maxQueryFrequency ) are considered as misspelled and used for finding > suggestions. > ... > These parameters (maxQueryFrequency and thresholdTokenFrequency) can be a > percentage (such as .01, or 1%) or an absolute value (such as 4)." > > Checking in the latest source code[1] : public static final float > DEFAULT_MAXQUERYFREQUENCY = 0.01f; > > This means that for the direct Solr Spellcheck, you should not get the > suggestion if the term has a Document Frequency >=0.01 ( so if a term is in > the index ) . > Can you show us the snippet of the result you got ? > > > > > > > > > ----- > --------------- > 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 > -- <http://corp.flipp.com> <http://corp.flipp.com> Sanjana Sridhar Flipp Corporation p: 226-600-2281 e: sanjana.srid...@flipp.com -- IMPORTANT NOTICE: This message, including any attachments (hereinafter collectively referred to as "Communication"), is intended only for the addressee(s) named above. This Communication may include information that is privileged, confidential and exempt from disclosure under applicable law. If the recipient of this Communication is not the intended recipient, or the employee or agent responsible for delivering this Communication to the intended recipient, you are notified that any dissemination, distribution or copying of this Communication is strictly prohibited. If you have received this Communication in error, please notify the sender immediately by phone or email and permanently delete this Communication from your computer without making a copy. Thank you.