Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.analysis.tokenattributes
Interface KeywordAttribute

All Superinterfaces:
  Attribute

All Known Implementing Classes:
  KeywordAttributeImpl

    public interface KeywordAttribute

extends Attribute

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
`boolean` | `isKeyword()` Returns `true` if the current token is a keyword, otherwise `false`
`void` | `setKeyword(boolean isKeyword)` Marks the current token as keyword if set to `true`.

Method Detail

### isKeyword

    boolean isKeyword()

  Returns `true` if the current token is a keyword, otherwise `false`

  Returns:
    `true` if the current token is a keyword, otherwise `false`
  See Also:
    `setKeyword(boolean)`

### setKeyword

    void setKeyword(boolean isKeyword)

  Marks the current token as keyword if set to `true`.

  Parameters:
    `isKeyword` - `true` if the current token is a keyword, otherwise `false`.
  See Also:
    `isKeyword()`

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.