lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niraj Aswani <nirajasw...@gmail.com>
Subject Re: unordered autocomplete search
Date Mon, 04 Sep 2017 11:27:05 GMT
Hi Mikhali,

Thank you very much for your quick response.

This does seem to fix the issue of unordered words in the autocomplete,
however, then I loose the capability of matching misspelled words.

Is there anything that can be done to combine the functionality of the two?

Regards,
Niraj



On Mon, Sep 4, 2017 at 11:13 AM, Mikhail Khludnev <mkhl@apache.org> wrote:

> The first question is, "sourceLocation">test.dict</str> makes sense?
> Then, for me, it looks like a case for AnalyzingInfixLookupFactory
> https://lucidworks.com/2015/03/04/solr-suggester/ rather than
>
>    - The FuzzyLookupFactory that creates suggestions for misspelled words
>    in fields.
>
>
>
>
> On Mon, Sep 4, 2017 at 11:57 AM, Niraj Aswani <nirajaswani@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am using solr 5.5.4.
> >
> > I would like to perform an unordered autocomplete search however it seems
> > that it only suggests phrases that start with my term in the query.
> >
> > For example, in my dictionary I have,
> >
> > *lamp desk*
> >
> > When searching for the term "lamp", it is able to show the the suggestion
> > "lamp desk" as the suggestion is starting with the word "lamp". However,
> > when I search for the term "desk", it doesn't show any suggestion.
> >
> > My field in the *managed-schema* is as below:
> >
> > <fieldType name="suggest_field" class="solr.TextField"
> > positionIncrementGap="100">
> >   <analyzer type="index">
> >     <tokenizer class="solr.StandardTokenizerFactory" />
> >     <filter class="solr.EdgeNGramFilterFactory" maxGramSize="100"/>
> >   </analyzer>
> >   <analyzer type="query">
> >     <tokenizer class="solr.StandardTokenizerFactory" />
> >   </analyzer>
> > </fieldType>
> >
> > My controller in *solconfig.xml* is defined as the following:
> >
> > <!-- autocomplete suggestions -->
> > <searchComponent name="suggest" class="solr.SuggestComponent">
> >   <lst name="suggester">
> >     <str name="name">default</str>
> >     <str name="lookupImpl">FuzzyLookupFactory</str>
> >     <str name="sourceLocation">test.dict</str>
> >     <str name="suggestAnalyzerFieldType">suggest_field</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>
> >
> > The *query* I fire is:
> >
> > http://localhost:8983/solr/core1/suggest?q=desk&suggest.build=true
> >
> > is there anyway, I can get the above scenario working?
> >
> > Many thanks,
> > Niraj
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message