lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Hazari <rajeshhaz...@gmail.com>
Subject Re: Trying to get AnalyzingInfixSuggester to work in Solr?
Date Wed, 06 May 2015 21:28:26 GMT
yes "textSuggest" is of type "text_general" with below definition

<fieldType name="text_general" class="solr.TextField"
 positionIncrementGap="100" sortMissingLast="true" omitNorms="true">
     <analyzer type="index">
        <tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.ClassicFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
<filter class="solr.ShingleFilterFactory" maxShingleSize="5"
outputUnigrams="true"/>
      </analyzer>
      <analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory"
mapping="mapping-FoldToASCII.txt"/>
         <tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.ClassicFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.KeywordMarkerFilterFactory"
protected="protwords.txt"/>
<filter class="solr.ShingleFilterFactory" maxShingleSize="5"
outputUnigrams="true"/>
      </analyzer>
    </fieldType>

*Rajesh.*

On Wed, May 6, 2015 at 4:50 PM, O. Olson <olson_ord@yahoo.it> wrote:

> Thank you Rajesh for responding so quickly. I tried it again with a restart
> and a reimport and I still cannot get this to work i.e. I'm seeing no
> difference.
>
> I'm wondering how you define: 'textSuggest' in your schema? In my case I
> use
> the field 'text' that is defined as:
>
> <field name="text" type="text_general" indexed="true" stored="false"
> multiValued="true"/>
>
> I'm wondering if your 'textSuggest' is of type "text_general" ?
>
> Thank you again for your help
> O. O.
>
>
> Rajesh Hazari wrote
> > I just tested your config with my schema and it worked.
> >
> > my config :
> >
> > <searchComponent class="solr.SpellCheckComponent" name="suggest1">
> >
> > <lst name="spellchecker">
> >
> > <str name="name">
> > suggest
> > </str>
> >
> > <str name="classname">
> > org.apache.solr.spelling.suggest.Suggester
> > </str>
> >
> > <str
> > name="lookupImpl">
> > org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory
> > </str>
> >
> > <str name="field">
> > textSuggest
> > </str>
> >
> > <float name="threshold">
> > 0.005
> > </float>
> >
> > <str name="buildOnCommit">
> > true
> > </str>
> >
> > <str name="suggestAnalyzerFieldType">
> > text_general
> > </str>
> >
> > <bool name="exactMatchFirst">
> > true
> > </bool>
> >
> > </lst>
> >
> > </searchComponent>
> >
> > <queryConverter name="queryConverter"
> > class="org.apache.solr.spelling.SuggestQueryConverter"/>
> >
> > <requestHandler class="org.apache.solr.handler.component.SearchHandler"
> > name="/suggest1">
> >
> > <lst name="defaults">
> >
> > <str name="spellcheck">
> > true
> > </str>
> >
> > <str name="spellcheck.dictionary">
> > suggest
> > </str>
> >
> > <str name="spellcheck.onlyMorePopular">
> > true
> > </str>
> >
> > <str name="spellcheck.count">
> > 5
> > </str>
> >
> > <str name="spellcheck.collate">
> > true
> > </str>
> >
> > </lst>
> >
> > <arr name="components">
> >
> > <str>
> > suggest1
> > </str>
> >
> > </arr>
> >
> > </requestHandler>
> >
> >
> http://localhost:8585/solr/collection1/suggest1?q=apple&rows=10&wt=json&indent=true
> >
> > {
> >   "responseHeader":{
> >     "status":0,
> >     "QTime":2},
> >   "spellcheck":{
> >     "suggestions":[
> >       "apple",{
> >         "numFound":5,
> >         "startOffset":0,
> >         "endOffset":5,
> >         "suggestion":["
> *
> > apple
> *
> > ",
> >           "
> *
> > apple
> *
> >  and",
> >           "
> *
> > apple
> *
> >  and facebook",
> >           "
> *
> > apple
> *
> >  and facebook learn",
> >           "
> *
> > apple
> *
> >  and facebook learn from"]},
> >       "collation","
> *
> > apple
> *
> > "]}}
> >
> >
> >
> > *Rajesh**.*
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Trying-to-get-AnalyzingInfixSuggester-to-work-in-Solr-tp4204163p4204208.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

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