github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/entity/index_scalar.go (about)

     1  package entity
     2  
     3  var _ Index = (*indexScalar)(nil)
     4  
     5  type indexScalar struct {
     6  	baseIndex
     7  }
     8  
     9  func (i *indexScalar) Params() map[string]string {
    10  	result := make(map[string]string)
    11  	if i.baseIndex.it != "" {
    12  		result[tIndexType] = string(i.baseIndex.it)
    13  	}
    14  	return result
    15  }
    16  
    17  func NewScalarIndex() Index {
    18  	return &indexScalar{
    19  		baseIndex: baseIndex{},
    20  	}
    21  }
    22  
    23  func NewScalarIndexWithType(indexType IndexType) Index {
    24  	return &indexScalar{
    25  		baseIndex: baseIndex{
    26  			it: indexType,
    27  		},
    28  	}
    29  }