Documentation
¶
Index ¶
- func NewEngineErr(err error) *pspb.EngineFailure
- type BulkItemResponse
- type BulkResponse
- type CostTime
- type DocResult
- type DocResultWrite
- type DocResults
- type DocStreamResult
- type HighlightResult
- type Hits
- type IndexErrMap
- type NameCache
- type ObjResponse
- type Response
- type Responses
- type SearchResponse
- type SearchResponses
- func (srs SearchResponses) ToContent(from, size int, nameCache NameCache, typedKeys bool, took time.Duration, ...) ([]byte, error)
- func (srs SearchResponses) ToContentIds(from, size int, nameCache NameCache, took time.Duration, idIsLong bool) ([]byte, error)
- func (srs SearchResponses) ToIDContent() []byte
- type SearchStatus
- type Shards
- type WriteError
- type WriteResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEngineErr ¶
func NewEngineErr(err error) *pspb.EngineFailure
Types ¶
type BulkItemResponse ¶
type BulkItemResponse struct {
OpType pspb.OpType `json:"-"`
ItemValue *DocResultWrite `json:"-"`
}
func (*BulkItemResponse) HasError ¶
func (this *BulkItemResponse) HasError() bool
func (*BulkItemResponse) KeyName ¶
func (this *BulkItemResponse) KeyName() string
type BulkResponse ¶
type BulkResponse struct {
Took uint64 `json:"took"`
Items []*BulkItemResponse `json:"items"`
}
type CostTime ¶
type CostTime struct {
ParamStartTime time.Time `json:"param_start_time"`
ParamEndTime time.Time `json:"param_end_time"`
GammaStartTime time.Time `json:"gamma_start_time"`
GammaEndTime time.Time `json:"gamma_end_time"`
DocSStartTime time.Time `json:"merge_start_time"`
DocSEndTime time.Time `json:"merge_end_time"`
ClientPsPStartTime time.Time `json:"clientpsp_start_time"`
ClientPsPEndTime time.Time `json:"clientpsp_end_time"`
PsHandlerStartTime time.Time `json:"pshandler_start_time"`
PsHandlerEndTime time.Time `json:"pshandler_end_time"`
PsSWStartTime time.Time `json:"pssw_start_time"`
PsSWEndTime time.Time `json:"pssw_end_time"`
}
type DocResult ¶
type DocResult struct {
Id string `json:"id,omitempty"`
DB entity.DBID `json:"db"`
Space entity.SpaceID `json:"space"`
Partition entity.PartitionID `json:"pid"`
Version int64 `json:"version,omitempty"`
Found bool `json:"found,omitempty"`
Replace bool `json:"replace,omitempty"`
Score float64 `json:"score,omitempty"`
SortValues sortorder.SortValues `json:"sort_value,omitempty"`
SlotID uint32 `json:"slot_id"`
Source json.RawMessage `json:"source,omitempty"`
Extra json.RawMessage `json:"extra,omitempty"`
Failure *pspb.EngineFailure `json:"failure,omitempty"`
Type pspb.OpType `json:"type"`
Highlight HighlightResult `json:"highlight,omitempty"`
CostTime *CostTime `json:"costtime,omitempty"`
}
func NewErrDocResult ¶
func NewErrDocResults ¶
func NewNotFoundDocResult ¶
type DocResultWrite ¶
func (*DocResultWrite) SuccessStatus ¶
func (doc *DocResultWrite) SuccessStatus() int
func (*DocResultWrite) ToContent ¶
func (this *DocResultWrite) ToContent(idIsLong bool) ([]byte, error)
func (*DocResultWrite) WriteResult ¶
func (doc *DocResultWrite) WriteResult() string
type DocResults ¶
type DocResults []*DocResult
type DocStreamResult ¶
type DocStreamResult struct {
Count int
// contains filtered or unexported fields
}
func NewDocStreamResult ¶
func NewDocStreamResult(ctx context.Context) *DocStreamResult
func (*DocStreamResult) AddDoc ¶
func (sdr *DocStreamResult) AddDoc(result *DocResult)
func (*DocStreamResult) AddErr ¶
func (sdr *DocStreamResult) AddErr(e error)
func (*DocStreamResult) Close ¶
func (sdr *DocStreamResult) Close()
func (*DocStreamResult) Next ¶
func (sdr *DocStreamResult) Next() (*DocResult, error)
type HighlightResult ¶
type IndexErrMap ¶
IndexErrMap tracks errors with the name of the index where it occurred
type ObjResponse ¶
type ObjResponse struct {
Value []byte `json:"value,omitempty"`
}
func NewObjResponse ¶
func NewObjResponse(value interface{}) (*ObjResponse, error)
func (*ObjResponse) Decode ¶
func (req *ObjResponse) Decode(i interface{}) error
this function will decoding or encoding value
type SearchResponse ¶
type SearchResponse struct {
PID uint32 `json:"-"`
Timeout bool `json:"time_out"`
Status *SearchStatus `json:"status"`
Hits Hits `json:"hits"`
Total uint64 `json:"total_hits"`
MaxScore float64 `json:"max_score"`
MaxTook int64 `json:"took"`
MaxTookID uint32 `json:"max_took_id"`
Explain map[uint32]string `json:"explain,omitempty"`
ByteArr []byte `json:"byte_arr"`
Start time.Time `json:"start_time"`
FieldType map[string]pspb.FieldType `json:"index_mapping"`
DBID int64 `json:"db_id"`
SpaceID int64 `json:"space_id"`
PartitionID uint32 `json:"partition_id"`
ArrayBool bool `json:"array_bool"`
}
func NewSearchResponseErr ¶
func NewSearchResponseErr(err error) *SearchResponse
func (*SearchResponse) Merge ¶
func (sr *SearchResponse) Merge(other *SearchResponse, so sort.SortOrder, from, size int) (err error)
Merge will merge together multiple SearchResults during a MultiSearch, two args :[sortOrder, size]
type SearchResponses ¶
type SearchResponses []*SearchResponse
func (SearchResponses) ToContentIds ¶
func (SearchResponses) ToIDContent ¶
func (srs SearchResponses) ToIDContent() []byte
type SearchStatus ¶
type SearchStatus struct {
Total int `json:"total"`
Failed int `json:"failed"`
Successful int `json:"successful"`
Errors IndexErrMap `json:"errors,omitempty"`
}
func (*SearchStatus) Merge ¶
func (ss *SearchStatus) Merge(other *SearchStatus)
Merge will merge together multiple SearchStatuses during a MultiSearch
type Shards ¶
type WriteError ¶
type WriteResponse ¶
type WriteResponse []*DocResult
func (WriteResponse) Merge ¶
func (this WriteResponse) Merge(src WriteResponse)
func (*WriteResponse) ToContent ¶
func (this *WriteResponse) ToContent(dbName, spaceName string, idIsLong bool) ([]byte, error)
func (*WriteResponse) ToContentBluk ¶
func (this *WriteResponse) ToContentBluk(nameCache NameCache, idIsLong bool) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.