org.apache.lucene.analysis.path

## Class ReversePathHierarchyTokenizer

- java.lang.Object
- - org.apache.lucene.util.AttributeSource
  - - org.apache.lucene.analysis.TokenStream
    - - org.apache.lucene.analysis.Tokenizer
      - - org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class ReversePathHierarchyTokenizer
      extends Tokenizer

  Tokenizer for domain-like hierarchies.

  Take something like:

       www.site.co.uk

  and make:

       www.site.co.uk
       site.co.uk
       co.uk
       uk

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource

      `AttributeSource.State`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `DEFAULT_DELIMITER`
    `static int` | `DEFAULT_SKIP`

    - ### Fields inherited from class org.apache.lucene.analysis.Tokenizer

      `input`

    - ### Fields inherited from class org.apache.lucene.analysis.TokenStream

      `DEFAULT_TOKEN_ATTRIBUTE_FACTORY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReversePathHierarchyTokenizer()`
    `ReversePathHierarchyTokenizer(AttributeFactory factory, char delimiter, char replacement, int skip)`
    `ReversePathHierarchyTokenizer(AttributeFactory factory, int bufferSize, char delimiter, char replacement, int skip)`
    `ReversePathHierarchyTokenizer(char delimiter, char replacement)`
    `ReversePathHierarchyTokenizer(char delimiter, char replacement, int skip)`
    `ReversePathHierarchyTokenizer(char delimiter, int skip)`
    `ReversePathHierarchyTokenizer(int skip)`
    `ReversePathHierarchyTokenizer(int bufferSize, char delimiter)`
    `ReversePathHierarchyTokenizer(int bufferSize, char delimiter, char replacement)`
    `ReversePathHierarchyTokenizer(int bufferSize, char delimiter, char replacement, int skip)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `end()`
    `boolean` | `incrementToken()`
    `void` | `reset()`

    - ### Methods inherited from class org.apache.lucene.analysis.Tokenizer

      `close, correctOffset, setReader`

    - ### Methods inherited from class org.apache.lucene.util.AttributeSource

      `addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_DELIMITER

          public static final char DEFAULT_DELIMITER

      See Also:
        Constant Field Values

    - #### DEFAULT_SKIP

          public static final int DEFAULT_SKIP

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer()

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(int skip)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(int bufferSize,
                                               char delimiter)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(char delimiter,
                                               char replacement)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(int bufferSize,
                                               char delimiter,
                                               char replacement)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(char delimiter,
                                               int skip)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(char delimiter,
                                               char replacement,
                                               int skip)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(AttributeFactory factory,
                                               char delimiter,
                                               char replacement,
                                               int skip)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(int bufferSize,
                                               char delimiter,
                                               char replacement,
                                               int skip)

    - #### ReversePathHierarchyTokenizer

          public ReversePathHierarchyTokenizer(AttributeFactory factory,
                                               int bufferSize,
                                               char delimiter,
                                               char replacement,
                                               int skip)

  - ### Method Detail

    - #### incrementToken

          public final boolean incrementToken()
                                       throws IOException

      Specified by:
        `incrementToken` in class `TokenStream`
      Throws:
        `IOException`

    - #### end

          public final void end()
                         throws IOException

      Overrides:
        `end` in class `TokenStream`
      Throws:
        `IOException`

    - #### reset

          public void reset()
                     throws IOException

      Overrides:
        `reset` in class `Tokenizer`
      Throws:
        `IOException`

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