Storage: Refine VectorIndexHNSW -> VectorIndex #9932
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: ref #9032
Problem Summary:
What is changed and how it works?
1.
VectorIndexHNSW
->VectorIndex
We dont need user to list HNSW explicitly. Prepare for AUTOINDEX.
2.
VectorIndexWriter
->VectorIndexWriterInMemory
&VectorIndexWriterOnDisk
This is to be aligned with
FullTextIndexWriterInMemory|OnDisk
.Previously we always construct inMemory and optionally write to disk.
Now user must explicitly choose inMemory or onDisk when constructing the writer (although for the vector onDisk we still construct inMemory) because FTSIndex support fully construct ondisk.
3.
LocalIndexViewer
->ICacheableLocalIndexReader
Viewer
->Reader
, because it may be either inMemory or onDisk. "View" only stands for the mmap way and is not a correct word for it.I
: stands for a pure abstract base class (i.e. Interface) that meant to be derived instead of constructed directly. Similar toIColumn
.Cacheable
: I think we only need it to provide necessary methods when put inside aLocalIndexCache
. There is no need to put other common parts for aLocalIndexReader
here. I expect to only have methods likegetMemoryCost
, etc. So let's call itICacheableLocalIndexReader
.Check List
Tests
Side effects
Documentation
Release note