what about this query? try to see if you get suggestions here: /solr/collection1/select?q=*%3Abecaus&wt=json&indent=true&spellcheck=true
On Wed, Sep 18, 2013 at 4:02 AM, jazzy <jaskaranchau...@hotmail.com> wrote: > I'm trying to get the Solr SpellCheckComponent working but am running into > some issues. When I run > .../solr/collection1/select?q=%3A&wt=json&indent=true > > These results are returned > > { > "responseHeader": { > "status": 0, > "QTime": 1, > "params": { > "indent": "true", > "q": "*:*", > "_": "1379457032534", > "wt": "json" > } > }, > "response": { > "numFound": 2, > "start": 0, > "docs": [ > { > "enterprise_name": "because", > "name": "doc1", > "enterprise_id": "100", > "_version_": 1446463888248799200 > }, > { > "enterprise_name": "what", > "name": "RZTEST", > "enterprise_id": "102", > "_version_": 1446464432735518700 > } > ] > } > } > Those are the values that I have indexed. Now when I want to query for > spelling I get some weird results. > > When I run > > .../solr/collection1/select?q=name%3Arxtest&wt=json&indent=true&spellcheck=true > > The results are accurate and I get > > { > "responseHeader":{ > "status":0, > "QTime":4, > "params":{ > "spellcheck":"true", > "indent":"true", > "q":"name:rxtest", > "wt":"json"}}, > "response":{"numFound":0,"start":0,"docs":[] > }, > "spellcheck":{ > "suggestions":[ > "rxtest",{ > "numFound":1, > "startOffset":5, > "endOffset":11, > "suggestion":["rztest"]}]}} > Anytime I run a query without the name values I get 0 results back. > > /solr/collection1/select?q=enterprise_name%3Abecaus&wt=json&indent=true&spellcheck=true > > { > "responseHeader":{ > "status":0, > "QTime":5, > "params":{ > "spellcheck":"true", > "indent":"true", > "q":"enterprise_name:becaus", > "wt":"json"}}, > "response":{"numFound":0,"start":0,"docs":[] > }, > "spellcheck":{ > "suggestions":[]}} > My guess is that there is something wrong in my scheme but everything looks > fine. > > Schema.xml > > <field name="name" type="text_general" indexed="true" stored="true"/> > <field name="enterprise_id" type="string" indexed="true" stored="true" > required="true" /> > <field name="enterprise_name" type="text_general" indexed="true" > stored="true"/> > > <field name="text" type="text_general" indexed="true" stored="false" > multiValued="true" /> > > <dynamicField name="*_t" type="text_general" indexed="true" > stored="true"/> > <dynamicField name="*_txt" type="text_general" indexed="true" > stored="true" multiValued="true"/> > <dynamicField name="attr_*" type="text_general" indexed="true" > stored="true" multiValued="true"/> > > <copyField source="name" dest="text"/> > <copyField source="enterprise_name" dest="text"/> > > > <fieldType name="text_general" class="solr.TextField" > positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt" /> > > <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.StopFilterFactory" ignoreCase="true" > words="stopwords.txt" /> > <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" expand="true"/> > <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> > </fieldType> > solrconfig.xml > > <requestHandler name="/select" class="solr.SearchHandler"> > > <lst name="defaults"> > <str name="echoParams">explicit</str> > <int name="rows">10</int> > <str name="df">text</str> > > <str name="spellcheck.dictionary">default</str> > > <str name="spellcheck.dictionary">wordbreak</str> > > <str name="spellcheck.onlyMorePopular">false</str> > > <str name="spellcheck.extendedResults">false</str> > > <str name="spellcheck.count">5</str> > </lst> > > <arr name="last-components"> > <str>spellcheck</str> > </arr> > <requestHandler> > > <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> > > <lst name="spellchecker"> > > <str name="name">default</str> > > <str name="classname">solr.IndexBasedSpellChecker</str> > > <str name="field">name</str> > > <str name="spellcheckIndexDir">./spellchecker</str> > > <str name="accuracy">0.5</str> > > <float name="thresholdTokenFrequency">.0001</float> > <str name="buildOnCommit">true</str> > </lst> > > <lst name="spellchecker"> > <str name="name">wordbreak</str> > <str name="classname">solr.WordBreakSolrSpellChecker</str> > <str name="field">name</str> > <str name="combineWords">true</str> > <str name="breakWords">true</str> > <int name="maxChanges">3</int> > <str name="buildOnCommit">true</str> > </lst> > > > <str name="queryAnalyzerFieldType">text_general</str> > </searchComponent> > > Any help would be appreciated. > Thanks! > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Solr-SpellCheckComponent-only-shows-results-with-certain-fields-tp4090727.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Regards, Raheel Hasan