consts.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package common
  2. import "github.com/milvus-io/milvus/client/v2/index"
  3. // cost default field name
  4. const (
  5. DefaultInt8FieldName = "int8"
  6. DefaultInt16FieldName = "int16"
  7. DefaultInt32FieldName = "int32"
  8. DefaultInt64FieldName = "int64"
  9. DefaultBoolFieldName = "bool"
  10. DefaultFloatFieldName = "float"
  11. DefaultDoubleFieldName = "double"
  12. DefaultVarcharFieldName = "varchar"
  13. DefaultJSONFieldName = "json"
  14. DefaultArrayFieldName = "array"
  15. DefaultFloatVecFieldName = "floatVec"
  16. DefaultBinaryVecFieldName = "binaryVec"
  17. DefaultFloat16VecFieldName = "fp16Vec"
  18. DefaultBFloat16VecFieldName = "bf16Vec"
  19. DefaultSparseVecFieldName = "sparseVec"
  20. DefaultDynamicNumberField = "dynamicNumber"
  21. DefaultDynamicStringField = "dynamicString"
  22. DefaultDynamicBoolField = "dynamicBool"
  23. DefaultDynamicListField = "dynamicList"
  24. DefaultBoolArrayField = "boolArray"
  25. DefaultInt8ArrayField = "int8Array"
  26. DefaultInt16ArrayField = "int16Array"
  27. DefaultInt32ArrayField = "int32Array"
  28. DefaultInt64ArrayField = "int64Array"
  29. DefaultFloatArrayField = "floatArray"
  30. DefaultDoubleArrayField = "doubleArray"
  31. DefaultVarcharArrayField = "varcharArray"
  32. )
  33. // cost for test cases
  34. const (
  35. RowCount = "row_count"
  36. DefaultTimeout = 120
  37. DefaultDim = 128
  38. DefaultShards = int32(2)
  39. DefaultNb = 3000
  40. DefaultNq = 5
  41. DefaultLimit = 10
  42. TestCapacity = 100 // default array field capacity
  43. TestMaxLen = 100 // default varchar field max length
  44. )
  45. // const default value from milvus config
  46. const (
  47. MaxPartitionNum = 1024
  48. DefaultDynamicFieldName = "$meta"
  49. QueryCountFieldName = "count(*)"
  50. DefaultPartition = "_default"
  51. DefaultIndexName = "_default_idx_102"
  52. DefaultIndexNameBinary = "_default_idx_100"
  53. DefaultRgName = "__default_resource_group"
  54. DefaultDb = "default"
  55. MaxDim = 32768
  56. MaxLength = int64(65535)
  57. MaxCollectionNameLen = 255
  58. DefaultRgCapacity = 1000000
  59. RetentionDuration = 40 // common.retentionDuration
  60. MaxCapacity = 4096 // max array capacity
  61. DefaultPartitionNum = 16 // default num_partitions
  62. MaxTopK = 16384
  63. MaxVectorFieldNum = 4
  64. MaxShardNum = 16
  65. )
  66. const (
  67. IndexStateIndexStateNone index.IndexState = 0
  68. IndexStateUnissued index.IndexState = 1
  69. IndexStateInProgress index.IndexState = 2
  70. IndexStateFinished index.IndexState = 3
  71. IndexStateFailed index.IndexState = 4
  72. IndexStateRetry index.IndexState = 5
  73. )