Dear Solr community,

I am facing a behavior with a suggest request handler that does not look normal 
to me, and I would like to understand.


  *   Here is the configuration of the suggest component :

<searchComponent class="solr.SpellCheckComponent" name="suggest">
                <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.tst.TSTLookup</str>
                               <str name="field">suggest</str>
                               <float 
name="threshold">${autocomplete.threshold:0.005}</float>
                               <str name="buildOnCommit">true</str>
                </lst>
</searchComponent>


  *   Here is the configuration of the request handler :

<requestHandler class="org.apache.solr.handler.component.SearchHandler" 
name="/suggest">
                <lst name="defaults">
                               <str name="df">suggest</str>
                               <str name="spellcheck">true</str>
                               <str name="spellcheck.dictionary">suggest</str>
                               <str name="spellcheck.onlyMorePopular">true</str>
                               <str name="spellcheck.count">10</str>
                               <str name="fl">score</str>
                               <str name="spellcheck.collate">true</str>
                               <str 
name="spellcheck.collateExtendedResults">true</str>
                               <str name="spellcheck.maxCollations">10</str>
                               <str 
name="spellcheck.maxCollationTries">100</str>
                               <str name="spellcheck.count">10</str>
                               <str name="spellcheck.collate">true</str>
                </lst>
                <arr name="components">
                               <str>suggest</str>
                               <str>query</str>
                </arr>

                <lst name="appends">
                                <str name="fq">{!manifoldCFSecurity}</str>
               </lst>
</requestHandler>

For info, the "manifoldCFSecurity" parameter leads to a MCFQueryParser that 
generates a boolean query to be applied to the search.

When one performs a request on this handler, the parse() method of the 
MCFQueryParser is called by Solr for the main query, but also one additional 
time per suggested term. This behavior looks weird to me as it appears to be 
suboptimal to do one query per suggested term.

Is it normal ? Did I make a mistake in the configurations ?

Thanks for your help.

Regards,

Cedric

Reply via email to