Class PhrasesIdentificationComponent.PhrasesContextData

  • Enclosing class:

    public static final class PhrasesIdentificationComponent.PhrasesContextData
    extends Object
    Simple container for all request options and data this component needs to store in the Request Context
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Method Detail

      • parseAndValidateRequest

        public static PhrasesIdentificationComponent.PhrasesContextData parseAndValidateRequest​(SolrQueryRequest req)
                                                                                         throws org.apache.solr.common.SolrException
        Parses the params included in this request, throwing appropriate user level Exceptions for invalid input, and returning a PhrasesContextData suitable for use in this request.
      • summarize

        public String summarize​(List<PhrasesIdentificationComponent.Phrase> results)
        Given a list of phrases to be returned to the user, summarizes those phrases by decorating the original input string to indicate where the identified phrases exist, using summaryPre and summaryPost
        results - a list of (non overlapping) Phrases that have been identified, sorted from highest scoring to lowest
        the original user input, decorated to indicate the identified phrases