Documentation ¶
Index ¶
- func NewEngineErr(err error) *pspb.EngineFailure
- type BulkItemResponse
- type BulkResponse
- 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
- 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
func (*BulkItemResponse) ToContent ¶
func (this *BulkItemResponse) ToContent() ([]byte, error)
type BulkResponse ¶
type BulkResponse struct { Took uint64 `json:"took"` Items []*BulkItemResponse `json:"items"` }
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"` }
func NewErrDocResult ¶
func NewErrDocResults ¶
func NewNotFoundDocResult ¶
type DocResultWrite ¶
func (*DocResultWrite) SuccessStatus ¶
func (doc *DocResultWrite) SuccessStatus() int
func (*DocResultWrite) ToContent ¶
func (this *DocResultWrite) ToContent() ([]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"` Took int64 `json:"took"` Explain map[uint32]string `json:"explain,omitempty"` }
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
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) ([]byte, error)
func (*WriteResponse) ToContentBluk ¶
func (this *WriteResponse) ToContentBluk(nameCache NameCache) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.