You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ritesh Kumar <ri...@hotwaxsystems.com> on 2019/06/06 12:22:39 UTC

Suggest highlight is not working with context filter query

Hello Team,

I am not able to get highlighted terms from the Suggest component when
using a context filter query. My definition of the suggest search component
looks as follows.

<searchComponent name="suggest" class="solr.SuggestComponent">
    <lst name="suggester">
      <str name="name">mySuggester</str>
      <str name="lookupImpl">BlendedInfixLookupFactory</str>
      <str name="blenderType">position_linear</str>
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
      <str name="field">fieldName</str>
      <str name="contextField">contextFieldName</str>
      <str name="weightField"></str>
      <str name="suggestAnalyzerFieldType">textSuggest</str>
      <str name="queryAnalyzerFieldType">lowercase</str>
      <str name="indexPath">suggest</str>
      <str name="buildOnStartup">false</str>
      <str name="buildOnCommit">false</str>
      <bool name="exactMatchFirst">true</bool>
    </lst>
</searchComponent>

The BlendedInfixLookupFactory does support context filtering. However,
after doing a bit of finding it appears, this issue is a bug. Please, refer
to this ticket <https://issues.apache.org/jira/browse/SOLR-7964>.

Is there any way I will be able to get both context filtering and
highlighted response?

Thanks,
Ritesh Kumar