what_field.py 545 B

1234567891011121314151617181920212223242526
  1. from pymilvus import FieldSchema, DataType
  2. # milvus 向量数据库
  3. what_fields = [
  4. # 主键 ID
  5. FieldSchema(
  6. name="id",
  7. dtype=DataType.INT64,
  8. is_primary=True,
  9. auto_id=True,
  10. description="自增id",
  11. ),
  12. # 文档 id 字段
  13. FieldSchema(
  14. name="doc_id", dtype=DataType.VARCHAR, max_length=64, description="文档id"
  15. ),
  16. FieldSchema(
  17. name="vector_text",
  18. dtype=DataType.FLOAT_VECTOR,
  19. dim=2560,
  20. description="",
  21. )
  22. ]
  23. __all__ = ["what_fields"]