mirror of https://github.com/milvus-io/milvus.git
disable growing index for flat (#27309)
Signed-off-by: xianliang <xianliang.li@zilliz.com>pull/27313/head
parent
670cb386e7
commit
fa033e586a
|
@ -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_;
|
||||
|
|
|
@ -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_));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue