对于scalar field的index创建,这个indexType应该非必选吧?
https://github.com/milvus-io/milvus-sdk-java/blob/fbfba7975746dff19649b03ef5d64461cb562050/src/main/java/io/milvus/param/index/CreateIndexParam.java#L216
Varchar is a new type that allow index, only support one type index currently, the index type is "Trie". I need to add this new type to the IndexType enum. Will do this in beta3.
I add an index type "Trie" in pr #336. To create index for varchar field:
CreateIndexParam indexParam = CreateIndexParam.newBuilder()
.withCollectionName(randomCollectionName)
.withFieldName("str_field")
.withIndexName("stridx")
.withIndexType(IndexType.TRIE)
.withSyncMode(Boolean.TRUE)
.withSyncWaitingInterval(500L)
.withSyncWaitingTimeout(30L)
.build();
R<RpcStatus> createIndexR = client.createIndex(indexParam);
我要创建的不是string类型字段的索引,而是int32或者int64的,也是用IndexType.TRIE吗?不对吧?应该用哪个?
int8/int16/int32/int64/float/double 这些字段目前不支持建索引。 如果将来支持建索引的话,会有对应的IndexType。 如果现在对int8/int16/int32/int64/float/double 这些字段调用CreateIndex(),是没有效果的。
2.2.8增加了IndexType.SORT,用于设置int8/int16/int32/int64/float/double的索引