mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
3a3401dd3f
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
2.3 KiB
2.3 KiB
SegmentSealed
SegmentSealed has an extra interface rather than segment_inferface:
LoadIndex(loadIndexInfo)
: load the index. indexInfo containsFieldId
IndexParams
: index paramters in KV structure KVVecIndex
: vector index
LoadFieldData(loadFieldDataInfo)
: load column data, could be either scalar column or vector column- Note: indexes and vector data for the same column may coexist. Indexes are prioritized in search
DropIndex(fieldId)
: drop and release existed index of specified fieldDropFieldData(fieldId)
: drop and release existed data for specified field
Search is executable as long as all the columns involved in the search are loaded.
SegmentSealedImpl internal data definition
-
row_count_opt_
:- Fill row count when load the first entity
- All the other column loaded must match the same row count
-
xxx_ready_bitset_
&system_ready_count_
- Used to record whether the corresponding column is loaded. Bitset corresponds to FieldOffset
- Query is executable If and only if the following conditions are met:
- system_ready_count_ == 2, which means all the system columns' RowId/Timestamp are loaded
- The scalar columns involved in the query has been loaded
- For the vector columns involved in the query, either the original data or the index is loaded
-
scalar_indexings_
: store scalar index- Use StructuredSortedIndex in knowhere
-
primary_key_index_
: store index for pk column- Use brand new ScalarIndexBase format
- Note: The functions here may overlap with scalar indexes. It is recommended to replace scalar index with ScalarIndexBase
-
field_datas_
: store original dataaligned_vector<char>
format guaranteesint/float
data are aligned
-
SealedIndexingRecord vecindexs_
: store vector index -
row_ids_/timestamps_
: RowId/Timestamp data -
TimestampIndex
: Index for Timestamp column -
schema
: schema
SegmentSealedImpl internal function definition
- Most functions are the implementation of the corresponding functions of segment interface, which will not be repeated here
update_row_count
: Used to update the row_count fieldmask_with_timestamps
: Use Timestamp column to update search bitmask,used to support Time Travel function