milvus/docs/developer_guides/chap03_index_service.md
neza2017 56ab2bda2d Update proto:add partition id
Signed-off-by: neza2017 <yefu.chen@zilliz.com>
2021-01-15 11:53:22 +08:00

1.5 KiB

8. Index Service

8.1 Overview

8.2 Index Service Interface

type IndexService interface {
  Service
  RegisterNode(req RegisterNodeRequest) (RegisterNodeResponse, error)
  BuildIndex(req BuildIndexRequest) (BuildIndexResponse, error)
	GetIndexStates(req IndexStatesRequest) (IndexStatesResponse, error)
	GetIndexFilePaths(req IndexFilePathRequest) (IndexFilePathsResponse, error)
}
  • RegisterNode
type RegisterNodeRequest struct {
  RequestBase
  Address string
  Port int64
}

type RegisterNodeResponse struct {
  //InitParams
}
  • BuildIndex
type BuildIndexRequest struct {
  DataPaths []string
  TypeParams map[string]string
  IndexParams map[string]string
}

type BuildIndexResponse struct {
  IndexID UniqueID
}
  • GetIndexStates
type IndexStatesRequest struct {
	IndexID UniqueID 
}

enum IndexState {
    NONE = 0;
    UNISSUED = 1;
    INPROGRESS = 2;
    FINISHED = 3;
}

type IndexStatesResponse struct {
	ID                UniqueID
	State            IndexState
	//EnqueueTime       time.Time
	//ScheduleTime      time.Time
	//BuildCompleteTime time.Time
}
  • GetIndexFilePaths
type IndexFilePathRequest struct {
  IndexID UniqueID
}

type IndexFilePathsResponse struct {
  FilePaths []string
}

8.3 Index Node Interface

type IndexNode interface {
  Service
//  SetTimeTickChannel(channelName string) error
//  SetStatsChannel(channelName string) error
  
  BuildIndex(req BuildIndexRequest) (BuildIndexResponse, error)
}