disable growing index for flat (#27309)

Signed-off-by: xianliang <xianliang.li@zilliz.com>
pull/27313/head
foxspy 2023-09-22 14:19:24 +08:00 committed by GitHub
parent 670cb386e7
commit fa033e586a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View File

@ -21,6 +21,7 @@
#include "pb/common.pb.h"
#include "pb/segcore.pb.h"
#include "knowhere/utils.h"
#include "Types.h"
namespace milvus {
@ -44,6 +45,11 @@ class FieldIndexMeta {
return index_params_.at(knowhere::meta::INDEX_TYPE);
}
bool
IsFlatIndex() const {
return knowhere::IsFlatIndex(GetIndexType());
}
const std::map<std::string, std::string>&
GetIndexParams() const {
return index_params_;

View File

@ -251,12 +251,17 @@ class IndexingRecord {
//Small-Index disabled, create index for vector field only
if (index_meta_->GetIndexMaxRowCount() > 0 &&
index_meta_->HasFiled(field_id)) {
field_indexings_.try_emplace(
field_id,
CreateIndex(field_meta,
index_meta_->GetFieldIndexMeta(field_id),
index_meta_->GetIndexMaxRowCount(),
segcore_config_));
auto vec_filed_meta =
index_meta_->GetFieldIndexMeta(field_id);
//Disable growing index for flat
if (!vec_filed_meta.IsFlatIndex()) {
field_indexings_.try_emplace(
field_id,
CreateIndex(field_meta,
vec_filed_meta,
index_meta_->GetIndexMaxRowCount(),
segcore_config_));
}
}
}
}

View File

@ -11,7 +11,7 @@
# or implied. See the License for the specific language governing permissions and limitations under the License.
#-------------------------------------------------------------------------------
set( KNOWHERE_VERSION 1dcd84b4 )
set( KNOWHERE_VERSION b724230 )
set( GIT_REPOSITORY "https://github.com/zilliztech/knowhere.git")
if ( INDEX_ENGINE STREQUAL "cardinal" )
set( KNOWHERE_VERSION main)