Class PhrasesIdentificationComponent.PhrasesContextData
java.lang.Object
org.apache.solr.handler.component.PhrasesIdentificationComponent.PhrasesContextData
- Enclosing class:
PhrasesIdentificationComponent
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SchemaFieldfinal intfinal intfinal Stringfinal Stringfinal String -
Method Summary
Modifier and TypeMethodDescriptionParses the params included in this request, throwing appropriate user level Exceptions for invalid input, and returning aPhrasesContextDatasuitable for use in this request.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, usingsummaryPreandsummaryPost
-
Field Details
-
rawInput
-
maxIndexedPositionLength
public final int maxIndexedPositionLength -
maxQueryPositionLength
public final int maxQueryPositionLength -
fieldWeights
-
analysisField
-
allPhrases
-
summaryPre
-
summaryPost
-
-
Method Details
-
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 aPhrasesContextDatasuitable for use in this request.- Throws:
org.apache.solr.common.SolrException
-
summarize
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, usingsummaryPreandsummaryPost- Parameters:
results- a list of (non overlapping) Phrases that have been identified, sorted from highest scoring to lowest- Returns:
- the original user input, decorated to indicate the identified phrases
-