Hmmm, the example you post seems correct to me, the returned
suggestion is really close to the term. What are you expecting here?

The example is inconsistent with
"it returns the suggestion corresponding to the alphabets (ignoring the
numbers)"

It looks like it's considering the numbers just fine, which is what makes
the returned suggestion close to the term I think.

Best,
Erick


On Tue, Feb 11, 2014 at 1:01 PM, Developer <bbar...@gmail.com> wrote:

> I have a strange issue with Autosuggest.
>
> Whenever I query for a keyword along with numbers (leading) it returns the
> suggestion corresponding to the alphabets (ignoring the numbers). I was
> under assumption that it will return an empty result back. I am not sure
> what I am doing wrong. Can someone help?
>
> *Query:*
>
> /autocomplete?qt=/lucid&req_type=auto_complete&spellcheck.maxCollations=10&q="12342343243242ga"&spellcheck.count=10
>
> *Result:*
>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">1</int>
> </lst>
> <lst name="spellcheck">
> <lst name="suggestions">
> <lst name="ga">
> <int name="numFound">1</int>
> <int name="startOffset">15</int>
> <int name="endOffset">17</int>
> <arr name="suggestion">
> <str>galaxy</str>
> </arr>
> </lst>
> <str name="collation">"12342343243242galaxy"</str>
> </lst>
> </lst>
> </response>
>
>
> *My field configuration is as below:*
>     <fieldType class="solr.TextField" name="textSpell_word"
> positionIncrementGap="100">
>         <analyzer>
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>                 <filter class="solr.LowerCaseFilterFactory"/>
>                 <filter class="solr.StopFilterFactory"
> enablePositionIncrements="true"
> ignoreCase="true" words="stopwords_autosuggest.txt"/>
>         </analyzer>
>     </fieldType>
>
> *SolrConfig.xml*
>
>         <searchComponent class="solr.SpellCheckComponent"
> name="autocomplete">
>                 <lst name="spellchecker">
>                         <str name="name">autocomplete</str>
>                         <str
> name="classname">org.apache.solr.spelling.suggest.Suggester</str>
>                         <str
> name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
>                         <str name="field">autocomplete_word</str>
>                         <str name="storeDir">autocomplete</str>
>                         <str name="buildOnCommit">true</str>
>                         <float name="threshold">.005</float>
>
>                 </lst>
>         </searchComponent>
>         <requestHandler
> class="org.apache.solr.handler.component.SearchHandler"
> name="/autocomplete">
>                 <lst name="defaults">
>                         <str name="spellcheck">true</str>
>                         <str
> name="spellcheck.dictionary">autocomplete</str>
>                         <str name="spellcheck.collate">true</str>
>                         <str name="spellcheck.count">10</str>
>                         <str name="spellcheck.onlyMorePopular">false</str>
>                 </lst>
>                 <arr name="components">
>                         <str>autocomplete</str>
>                 </arr>
>         </requestHandler>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Autosuggest-Strange-issue-with-leading-numbers-in-query-tp4116751.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to