Class LexiconFunction
- java.lang.Object
-
- com.marklogic.mapreduce.functions.LexiconFunction
-
- Direct Known Subclasses:
CooccurrencesFunction,ValueOrWordMatchFunction,ValuesOrWordsFunction
public abstract class LexiconFunction extends Object
Super class for all supported lexicon functions.MarkLogicInputFormatandMarkLogicRecordReaderget the input query and split query from these classes when a lexicon function is specified in the config by settinginput.lexiconfunctionclass.
-
-
Constructor Summary
Constructors Constructor Description LexiconFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetInputQuery(Collection<String> nsCol, long start, long count)Get the input query used by a record reader.StringgetLexiconQuery()Get the cts:query specified by the user as part of the lexicon function to filter fragments used to retrieve the lexicons.String[]getUserDefinedOptions()Get user-defined options for the lexicon function.
-
-
-
Method Detail
-
getLexiconQuery
public String getLexiconQuery()
Get the cts:query specified by the user as part of the lexicon function to filter fragments used to retrieve the lexicons.This corresponds to the $query parameter of a lexicon function. Users may override this method if the default is not suitable.
- Returns:
- cts:query.
-
getInputQuery
public abstract String getInputQuery(Collection<String> nsCol, long start, long count)
Get the input query used by a record reader. Users must not override this method.- Parameters:
nsCol- alias-URI pairs of namespace specsstart- start of the splitcount- count of the split- Returns:
- input query.
-
getUserDefinedOptions
public String[] getUserDefinedOptions()
Get user-defined options for the lexicon function.This method corresponds to the $options parameter of a lexicon function. Override this method to pass options to the lexicon function. The options skip and truncate are reserved for internal use by the connector.
-
-