Class Index.Builder

  • java.lang.Object
    • io.milvus.client.Index.Builder
  • Enclosing class:

    public static class Index.Builder
    extends java.lang.Object
    Builder for Index
    • Constructor Summary

      Constructor Description
      Builder​(java.lang.String collectionName, IndexType indexType)  
    • Method Summary

      Modifier and Type Method Description
      Index build()  
      Index.Builder withParamsInJson​(java.lang.String paramsInJson)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder​(@Nonnull
                       java.lang.String collectionName,
                       IndexType indexType)
        collectionName - collection to create index on
        indexType - a IndexType object
    • Method Detail

      • withParamsInJson

        public Index.Builder withParamsInJson​(@Nonnull
                                              java.lang.String paramsInJson)
        Optional. Default to empty String. Index parameters are different for different index types. Refer to for more information.
         FLAT/IVFLAT/SQ8: {"nlist": 16384}
         nlist range:[1, 999999]
         IVFPQ: {"nlist": 16384, "m": 12}
         nlist range:[1, 999999]
         m is decided by dim and have a couple of results.
         NSG: {"search_length": 45, "out_degree": 50, "candidate_pool_size": 300, "knng": 100}
         search_length range:[10, 300]
         out_degree range:[5, 300]
         candidate_pool_size range:[50, 1000]
         knng range:[5, 300]
         HNSW: {"M": 16, "efConstruction": 500}
         M range:[5, 48]
         efConstruction range:[100, 500]
         ANNOY: {"n_trees": 4}
         n_trees range: [1, 16384)
        paramsInJson - extra parameters in JSON format
      • build

        public Index build()