Class DocumentLookupSuggester
- java.lang.Object
-
- org.nuxeo.ecm.platform.suggestbox.service.suggesters.DocumentLookupSuggester
-
- All Implemented Interfaces:
Suggester
public class DocumentLookupSuggester extends Object implements Suggester
Perform a NXQL full-text query (on the title by default) on the repository and suggest to navigate to the top documents matching that query.- Author:
- ogrisel
-
-
Field Summary
Fields Modifier and Type Field Description protected SuggesterDescriptor
descriptor
protected List<String>
highlights
protected String
providerName
-
Constructor Summary
Constructors Constructor Description DocumentLookupSuggester()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initWithParameters(SuggesterDescriptor descriptor)
Configure the Suggester instance with the parameters from the XML descriptor.List<Suggestion>
suggest(String userInput, SuggestionContext context)
Compute a list of possible user actions or intents given their input and context.
-
-
-
Field Detail
-
highlights
protected List<String> highlights
-
providerName
protected String providerName
-
descriptor
protected SuggesterDescriptor descriptor
-
-
Constructor Detail
-
DocumentLookupSuggester
public DocumentLookupSuggester()
-
-
Method Detail
-
initWithParameters
public void initWithParameters(SuggesterDescriptor descriptor)
Description copied from interface:Suggester
Configure the Suggester instance with the parameters from the XML descriptor.- Specified by:
initWithParameters
in interfaceSuggester
- Parameters:
descriptor
- XMap descriptor with the aggregate configuration information of the component.
-
suggest
public List<Suggestion> suggest(String userInput, SuggestionContext context) throws SuggestionException
Description copied from interface:Suggester
Compute a list of possible user actions or intents given their input and context.- Specified by:
suggest
in interfaceSuggester
- Parameters:
userInput
- text typed by the usercontext
- user context- Returns:
- generated suggestion for the given input and context
- Throws:
SuggestionException
- if the configuration or context are inconsistent, or a backing service is failing.
-
-