org.apache.cassandra.index.sasi.conf.view

## Class PrefixTermTree

- java.lang.Object
- - org.apache.cassandra.index.sasi.conf.view.RangeTermTree
  - - org.apache.cassandra.index.sasi.conf.view.PrefixTermTree

- All Implemented Interfaces:
    TermTree

      public class PrefixTermTree
      extends RangeTermTree

  This class is an extension over RangeTermTree for string terms, it is required because interval tree can't handle matching if search is on the prefix of min/max of the range, so for ascii/utf8 fields we build an additional prefix trie (including both min/max terms of the index) and do union of the results of the prefix tree search and results from the interval tree lookup.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PrefixTermTree.Builder`

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.index.sasi.conf.view.RangeTermTree

      `RangeTermTree.Term`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.index.sasi.conf.view.RangeTermTree

      `comparator, max, min, rangeTree`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrefixTermTree(java.nio.ByteBuffer min, java.nio.ByteBuffer max, Trie<java.nio.ByteBuffer,java.util.Set<SSTableIndex>> trie, IntervalTree<RangeTermTree.Term,SSTableIndex,Interval<RangeTermTree.Term,SSTableIndex>> ranges, OnDiskIndexBuilder.Mode mode, AbstractType<?> comparator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Set<SSTableIndex>` | `search(Expression e)`

    - ### Methods inherited from class org.apache.cassandra.index.sasi.conf.view.RangeTermTree

      `intervalCount`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PrefixTermTree

          public PrefixTermTree(java.nio.ByteBuffer min,
                                java.nio.ByteBuffer max,
                                Trie<java.nio.ByteBuffer,java.util.Set<SSTableIndex>> trie,
                                IntervalTree<RangeTermTree.Term,SSTableIndex,Interval<RangeTermTree.Term,SSTableIndex>> ranges,
                                OnDiskIndexBuilder.Mode mode,
                                AbstractType<?> comparator)

  - ### Method Detail

    - #### search

          public java.util.Set<SSTableIndex> search(Expression e)

      Specified by:
        `search` in interface `TermTree`
      Overrides:
        `search` in class `RangeTermTree`

Copyright © 2018 The Apache Software Foundation