Interface KeywordAttribute
- All Superinterfaces:
Attribute
- All Known Implementing Classes:
KeywordAttributeImpl
This attribute can be used to mark a token as a keyword. Keyword aware
TokenStream
s can
decide to modify a token based on the return value of isKeyword()
if the token is
modified. Stemming filters for instance can use this attribute to conditionally skip a term if
isKeyword()
returns true
.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the current token is a keyword, otherwisefalse
void
setKeyword
(boolean isKeyword) Marks the current token as keyword if set totrue
.
-
Method Details
-
isKeyword
boolean isKeyword()Returnstrue
if the current token is a keyword, otherwisefalse
- Returns:
true
if the current token is a keyword, otherwisefalse
- See Also:
-
setKeyword
void setKeyword(boolean isKeyword) Marks the current token as keyword if set totrue
.- Parameters:
isKeyword
-true
if the current token is a keyword, otherwisefalse
.- See Also:
-