org.apache.cassandra.db.index

## Class SecondaryIndexSearcher

- java.lang.Object
- - org.apache.cassandra.db.index.SecondaryIndexSearcher

- Direct Known Subclasses:
    CompositesSearcher, KeysSearcher

      public abstract class SecondaryIndexSearcher
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ColumnFamilyStore` | `baseCfs`
    `protected java.util.Set<java.nio.ByteBuffer>` | `columns`
    `protected SecondaryIndexManager` | `indexManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SecondaryIndexSearcher(SecondaryIndexManager indexManager, java.util.Set<java.nio.ByteBuffer> columns)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canHandleIndexClause(java.util.List<IndexExpression> clause)`
    `SecondaryIndex` | `highestSelectivityIndex(java.util.List<IndexExpression> clause)`
    `protected IndexExpression` | `highestSelectivityPredicate(java.util.List<IndexExpression> clause, boolean includeInTrace)`
    `java.util.List<Row>` | `postReconciliationProcessing(java.util.List<IndexExpression> clause, java.util.List<Row> rows)` Combines index query results from multiple nodes.
    `boolean` | `requiresScanningAllRanges(java.util.List<IndexExpression> clause)` Returns `true` if the specified list of `IndexExpression`s require a full scan of all the nodes.
    `abstract java.util.List<Row>` | `search(ExtendedFilter filter)`
    `void` | `validate(IndexExpression indexExpression)` Validates the specified `IndexExpression`.

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

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

- - ### Field Detail

    - #### indexManager

          protected final SecondaryIndexManager indexManager

    - #### columns

          protected final java.util.Set<java.nio.ByteBuffer> columns

    - #### baseCfs

          protected final ColumnFamilyStore baseCfs

  - ### Constructor Detail

    - #### SecondaryIndexSearcher

          public SecondaryIndexSearcher(SecondaryIndexManager indexManager,
                                        java.util.Set<java.nio.ByteBuffer> columns)

  - ### Method Detail

    - #### highestSelectivityIndex

          public SecondaryIndex highestSelectivityIndex(java.util.List<IndexExpression> clause)

    - #### search

          public abstract java.util.List<Row> search(ExtendedFilter filter)

    - #### canHandleIndexClause

          public boolean canHandleIndexClause(java.util.List<IndexExpression> clause)

      Returns:
        true this index is able to handle the given index expressions.

    - #### validate

          public void validate(IndexExpression indexExpression)
                        throws InvalidRequestException

      Validates the specified `IndexExpression`. It will throw an `InvalidRequestException` if the provided clause is not valid for the index implementation.
      Parameters:
        `indexExpression` - An `IndexExpression` to be validated
      Throws:
        `InvalidRequestException` - in case of validation errors

    - #### highestSelectivityPredicate

          protected IndexExpression highestSelectivityPredicate(java.util.List<IndexExpression> clause,
                                                                boolean includeInTrace)

    - #### requiresScanningAllRanges

          public boolean requiresScanningAllRanges(java.util.List<IndexExpression> clause)

      Returns `true` if the specified list of `IndexExpression`s require a full scan of all the nodes.
      Parameters:
        `clause` - A list of `IndexExpression`s
      Returns:
        `true` if the `IndexExpression`s require a full scan, `false` otherwise

    - #### postReconciliationProcessing

          public java.util.List<Row> postReconciliationProcessing(java.util.List<IndexExpression> clause,
                                                                  java.util.List<Row> rows)

      Combines index query results from multiple nodes. This is done by the coordinator node after it has reconciled the replica responses.
      Parameters:
        `clause` - A list of `IndexExpression`s
        `rows` - The index query results to be combined
      Returns:
        The combination of the index query results

Copyright © 2018 The Apache Software Foundation