I'm pretty sure that FuzzyLookup only goes from the beginning of the
field, so this is not surprising. To get what you're looking for you
probably would get more joy from the AnalyzingInfixSuggester.
Best,
Erick

On Thu, Apr 23, 2015 at 6:20 AM, Swaraj Kumar <swaraj2...@gmail.com> wrote:
> I am trying to implement Suggester in SOLR 5.0,
>
> Below is my configuration :-
> <searchComponent name="suggest" class="solr.SuggestComponent">
>         <lst name="suggester">
>       <str name="name">my-suggester</str>
>       <str name="lookupImpl">FuzzyLookupFactory</str>
>       <str name="dictionaryImpl">DocumentDictionaryFactory</str>
>       <str name="field">name</str>
>       <str name="weightField">cityname</str>
>       <str name="payloadField">id</str>
>       <str name="suggestAnalyzerFieldType">text_general</str>
>       <str name="buildOnStartup">true</str>
>       </lst>
>   </searchComponent>
>
>   <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
>     <lst name="defaults">
>       <str name="suggest">true</str>
>       <str name="suggest.count">10</str>
>     </lst>
>     <arr name="components">
>       <str>suggest</str>
>     </arr>
>   </requestHandler>
>
>
> In Schema.xml :-
>  <field name="name" type="text_general" indexed="true" stored="true"/>
>
>  <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>
>
> My data is like :-
>
> Delhi
> New Delhi
> The New Castle
>
>
>
> When I Query using following parameter below :-
> http://localhost/solr/location/suggest?suggest.dictionary=my-suggester&suggest=true&suggest.build=true&suggest.q=Delhi
>
> I get "Delhi" only in result but the ideal result is both Delhi and New
> Delhi.
>
>
> It will be very helpful if you guyz suggest me how to achieve this.
>
>
> Regards,
> Swaraj

Reply via email to