public class SuggestCommand extends Command implements com.exalead.util.Checkable, java.io.Serializable
Command.Transformer<T>, Command.Visitor
Modifier and Type | Field and Description |
---|---|
boolean |
autocomplete |
static boolean |
DEFAULT_AUTOCOMPLETE |
static boolean |
DEFAULT_RECURSIVE |
boolean |
recursive |
java.lang.String |
targetReporting |
java.lang.String |
tokenizationConfig |
base, DEFAULT_BASE
Constructor and Description |
---|
SuggestCommand() |
SuggestCommand(SuggestCommand o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(Command.Transformer<T> transformer,
T[] t) |
void |
accept(Command.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SuggestCommand.
|
static SuggestCommand |
fromString(java.lang.String s)
String representation of this SuggestCommand.
|
java.lang.String |
getTargetReporting() |
java.lang.String |
getTokenizationConfig()
Tokenization config name
used to parse the query. |
boolean |
isAutocomplete()
Appends suggest results to the last query word being typed in the search field to autocomplete it.
It only works with a suggest built with the Subexpr matching or Substring matching build options. |
boolean |
isRecursive()
Discards the leftmost word of the query progressively.
It sends each new subquery to the suggest(s) until the max number of suggestions is reached, or until there is no more word to use. For example, for a query "A B C", the suggest will be called 3 times, with "A B C", "B C", and "C". |
SuggestCommand |
makeCopy()
Creates and returns a deep copy of this SuggestCommand.
|
static SuggestCommand |
readFrom(java.io.InputStream is)
Read this SuggestCommand from an XML fragment.
|
void |
setAutocomplete(boolean autocomplete)
Appends suggest results to the last query word being typed in the search field to autocomplete it.
It only works with a suggest built with the Subexpr matching or Substring matching build options. |
void |
setRecursive(boolean recursive)
Discards the leftmost word of the query progressively.
It sends each new subquery to the suggest(s) until the max number of suggestions is reached, or until there is no more word to use. For example, for a query "A B C", the suggest will be called 3 times, with "A B C", "B C", and "C". |
void |
setTargetReporting(java.lang.String targetReporting) |
void |
setTokenizationConfig(java.lang.String tokenizationConfig)
Tokenization config name
used to parse the query. |
java.lang.String |
toString()
String representation of this SuggestCommand.
|
SuggestCommand |
withAutocomplete(boolean autocomplete) |
SuggestCommand |
withAutocomplete(java.lang.Boolean autocomplete) |
SuggestCommand |
withBase(java.lang.String base) |
SuggestCommand |
withRecursive(boolean recursive) |
SuggestCommand |
withRecursive(java.lang.Boolean recursive) |
SuggestCommand |
withTargetReporting(java.lang.String targetReporting) |
SuggestCommand |
withTokenizationConfig(java.lang.String tokenizationConfig) |
void |
writeTo(java.io.OutputStream os)
Write this SuggestCommand as an XML fragment
|
public java.lang.String targetReporting
public java.lang.String tokenizationConfig
public boolean autocomplete
public static final boolean DEFAULT_AUTOCOMPLETE
public boolean recursive
public static final boolean DEFAULT_RECURSIVE
public SuggestCommand()
public SuggestCommand(SuggestCommand o)
public SuggestCommand withBase(java.lang.String base)
public void setTargetReporting(java.lang.String targetReporting)
public java.lang.String getTargetReporting()
public SuggestCommand withTargetReporting(java.lang.String targetReporting)
public void setTokenizationConfig(java.lang.String tokenizationConfig)
public java.lang.String getTokenizationConfig()
public SuggestCommand withTokenizationConfig(java.lang.String tokenizationConfig)
public void setAutocomplete(boolean autocomplete)
public boolean isAutocomplete()
public SuggestCommand withAutocomplete(boolean autocomplete)
public SuggestCommand withAutocomplete(java.lang.Boolean autocomplete)
public void setRecursive(boolean recursive)
public boolean isRecursive()
public SuggestCommand withRecursive(boolean recursive)
public SuggestCommand withRecursive(java.lang.Boolean recursive)
public SuggestCommand makeCopy()
public static SuggestCommand readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
public static SuggestCommand fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
public void accept(Command.Visitor visitor) throws com.exalead.util.TypedException
public <T> T accept(Command.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.