Skip to content

Challenge in implementing suggester over huge chunks of text #1

@innovationchef

Description

@innovationchef

I added the following XML to the solrconfig.xml file for implementing suggester module.

 <searchComponent name="suggest" class="solr.SuggestComponent">
      <lst name="suggester">
        <str name="name">mySuggester</str>
        <str name="lookupImpl">FuzzyLookupFactory</str>
        <str name="dictionaryImpl">DocumentDictionaryFactory</str>
        <str name="field">BioChemEntity.description</str>
        <str name="suggestAnalyzerFieldType">string</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>

This would capture the BioChemEntity.description entries and populate the suggester dictionary that is used internally by Solr to provide suggestions.

The suggestions were captured by the following -
http://localhost:8983/solr/solr_core_name/suggest?suggest=true&suggest.build=true&suggest.dictionary=mySuggester&suggest.q=can
to get suggestions for the word starting with 'can'. However, it throws an error in building up the dictionary. When the above link is posted on the browser, I receive an error (attaching the error file). The error means that Solr was not able to build its suggester dictionary for 106713 docs(that I indexed in one go) while using the description of samples.

Note: Description in biochementities contains huge chunks of text.
suggester_module_error.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions