milvus/docs/developer_guides/chap03_index_service.md
bigsheeper 2d2af1505a Improve mutex usage in query node
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2021-01-12 18:03:24 +08:00

1.3 KiB

8. Index Service

8.1 Overview

8.2 API

type Client interface {
  BuildIndex(req BuildIndexRequest) (BuildIndexResponse, error)
	GetIndexStates(req IndexStatesRequest) (IndexStatesResponse, error)
	GetIndexFilePaths(req IndexFilePathRequest) (IndexFilePathsResponse, error)
}
  • 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

type IndexNode interface {
  Start() error
  Close() error
  
//  SetTimeTickChannel(channelID string) error
  SetStatsChannel(channelID string) error
  
  BuildIndex(req BuildIndexRequest) (BuildIndexResponse, error)
}