Enum IndexType

  • All Implemented Interfaces:
    Serializable, Comparable<IndexType>

    public enum IndexType
    extends Enum<IndexType>
    Represents different types of indexing method to query the collection:
    
     1. FLAT - Provides 100% accuracy for recalls. However, performance might be downgraded due to huge computation effort;
    
     2. IVFLAT - K-means based similarity search which is balanced between accuracy and performance;
    
     3. IVF_SQ8 - Vector indexing that adopts a scalar quantization strategy that significantly reduces the size of a
     vector (by about 3/4), thus improving the overall throughput of vector processing;
    
     4. RNSG - NSG (Navigating Spreading-out Graph) is a graph-base search algorithm that a) lowers the average
     out-degree of the graph for fast traversal; b) shortens the search path; c) reduces the index
     size; d) lowers the indexing complexity. Extensive tests show that NSG can achieve very high
     search performance at high precision, and needs much less memory. Compared to non-graph-based
     algorithms, it is faster to achieve the same search precision.
    
     5. IVF_SQ8_H - An enhanced index algorithm of IVF_SQ8. It supports hybrid computation on both CPU and GPU,
     which significantly improves the search performance. To use this index type, make sure both cpu and gpu are added as
     resources for search usage in the Milvus configuration file.
    
     6. IVF_PQ - Indexing method built based on product quantization. The input vectors are split into distinct sub-vectors
     which are then quantized separately. Vector size can be reduced to 1/8 or 1/16 of the original size.
     If you choose this index, note that there is an inevicollection trade-off between memory and search accuracy.
    
     7. HNSW - Hierarchical Navigable Small World graphs
    
     
    • Method Detail

      • values

        public static IndexType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IndexType c : IndexType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IndexType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • valueOf

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

        public int getVal()