Enum Class OptimizeFor

java.lang.Object
java.lang.Enum<OptimizeFor>
org.apache.cassandra.index.sai.disk.v1.vector.OptimizeFor
All Implemented Interfaces:
Serializable, Comparable<OptimizeFor>, Constable

public enum OptimizeFor extends Enum<OptimizeFor>
Allows the vector index searches to be optimised for latency or recall. This is used by the VectorIndexSegmentSearcher to determine how many results to ask the graph to search for. If we are optimising for RECALL we ask for more than the requested limit which (since it will search deeper in the graph) will tend to surface slightly better results.
  • Enum Constant Details

  • Method Details

    • values

      public static OptimizeFor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OptimizeFor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • topKFor

      public int topKFor(int limit)
    • fromString

      public static OptimizeFor fromString(String value)