I haven't used suggest yet. But in spell check if you don't provide spellcheck.q, it will analyze the q parameter by a converter which "tokenize" your query. else it will use the analyzer of the field to process parameter q. If you don't want to tokenize query, you should pass spellcheck.q and provide your own analyzer such as keyword analyzer. you can achieve this by add <str name="fieldType">string</str> <lst name="spellchecker"> <str name="classname">solr.FileBasedSpellChecker</str> <str name="name">file</str> <str name="sourceLocation">spellings.txt</str> <str name="characterEncoding">UTF-8</str> <str name="spellcheckIndexDir">./spellchecker2</str> <str name="fieldType">string</str> </lst>
The wiki says <str name="queryAnalyzerFieldType">textSpell</str> But I read the codes of solr 1.4.1 and latest lucene/solr 4 trunk the both use the following codes. I think the wiki is out of date. public static final String FIELD_TYPE = "fieldType"; .... fieldTypeName = (String) config.get(FIELD_TYPE); if (core.getSchema().getFieldTypes().containsKey(fieldTypeName)) { FieldType fieldType = core.getSchema().getFieldTypes().get(fieldTypeName); analyzer = fieldType.getQueryAnalyzer(); } if you use file based spell check, it's ok. but for index based, if you tokenize the field, but do not tokenize your query, you still can get correct result. On Fri, Aug 19, 2011 at 5:40 PM, Valentin <igorlacro...@gmail.com> wrote: > I don't think it wil lhelp me, sorry. I just want my query to not be > tokenised, I want it to be considered as a full sentence to correct. > > But thanks for your answers, I keep searching. > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Full-sentence-spellcheck-tp3265257p3267629.html > Sent from the Solr - User mailing list archive at Nabble.com. >