Enum TextTokenizer.TokenizerMode
- java.lang.Object
-
- java.lang.Enum<TextTokenizer.TokenizerMode>
-
- com.apple.foundationdb.record.provider.common.text.TextTokenizer.TokenizerMode
-
- All Implemented Interfaces:
Serializable
,Comparable<TextTokenizer.TokenizerMode>
- Enclosing interface:
- TextTokenizer
public static enum TextTokenizer.TokenizerMode extends Enum<TextTokenizer.TokenizerMode>
Mode that can be used to alter tokenizer behavior depending on the the context its used in. In particular, some tokenizers (such as an n-gram tokenizer) might tokenize a document differently at index time than how they tokenize a query string at query time. To support this, implementations may choose to alter behavior based on the value of this flag.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TextTokenizer.TokenizerMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static TextTokenizer.TokenizerMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INDEX
public static final TextTokenizer.TokenizerMode INDEX
Tokenize aString
as if it were about to be indexed. This should generally be the mode used when tokenizing documents.
-
QUERY
public static final TextTokenizer.TokenizerMode QUERY
Tokenize aString
as if it were about to be used as the arguments to a query. This should generally be the mode used when tokenizing query strings.
-
-
Method Detail
-
values
public static TextTokenizer.TokenizerMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TextTokenizer.TokenizerMode c : TextTokenizer.TokenizerMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TextTokenizer.TokenizerMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-