Documentation ¶
Index ¶
- Constants
- func InjectEsAggResult(s *EsAggResult)
- func InjectEsRequest(s *EsRequest)
- func InjectGetResultDto(s *GetResultDto)
- func InjectQueryGroup(s *QueryGroup)
- func InjectQueryList(s *QueryList)
- func LoadEsAggResult() baseiface.ISingleton
- func LoadEsRequest() baseiface.ISingleton
- func LoadGetResultDto() baseiface.ISingleton
- func LoadQueryGroup() baseiface.ISingleton
- func LoadQueryList() baseiface.ISingleton
- type AggType
- type EsAggDto
- type EsAggResult
- func (self *EsAggResult) FromStatsResult(stats StatsResult) *EsAggResult
- func (self *EsAggResult) ToAgg2Result(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
- func (self *EsAggResult) ToAgg2ResultMap(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
- func (self *EsAggResult) ToAgg2ResultOne(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
- func (self *EsAggResult) Value2Stats()
- type EsRequest
- func (this *EsRequest) Client() *elastic.Client
- func (this *EsRequest) FindAnyName(data interface{}) string
- func (this *EsRequest) FullPath(data interface{}) string
- func (this *EsRequest) Parse2IndexName(data baseiface.IbaseProxy)
- func (this *EsRequest) Save2File(datas ...baseiface.IbaseProxy)
- func (this *EsRequest) Save2FileBytes(file string, proxy baseiface.IbaseProxy) error
- func (this *EsRequest) SaveFile()
- type EsStats
- type GetResultDto
- type QueryGroup
- type QueryList
- type ReqDto
- type StatsResult
Constants ¶
View Source
const C_StatFieldName = "stats"
Variables ¶
This section is empty.
Functions ¶
func InjectEsAggResult ¶
func InjectEsAggResult(s *EsAggResult)
func InjectEsRequest ¶
func InjectEsRequest(s *EsRequest)
func InjectGetResultDto ¶
func InjectGetResultDto(s *GetResultDto)
func InjectQueryGroup ¶
func InjectQueryGroup(s *QueryGroup)
func InjectQueryList ¶
func InjectQueryList(s *QueryList)
func LoadEsAggResult ¶
func LoadEsAggResult() baseiface.ISingleton
func LoadEsRequest ¶
func LoadEsRequest() baseiface.ISingleton
func LoadGetResultDto ¶
func LoadGetResultDto() baseiface.ISingleton
func LoadQueryGroup ¶
func LoadQueryGroup() baseiface.ISingleton
func LoadQueryList ¶
func LoadQueryList() baseiface.ISingleton
Types ¶
type EsAggDto ¶
type EsAggDto struct { AggType AggType `json:"agg_type"` AggName string `json:"agg_name"` AggField string `json:"agg_field"` StatField string `json:"stat_field"` AggOrderBy *dto.OrderByDto `json:"agg_order_by"` Size int `json:"size"` UseKey bool `json:"use_key"` }
func NewEsAggDto ¶
func NewEsAggDto() *EsAggDto
func (*EsAggDto) IfStatFields ¶
func (*EsAggDto) StatFieldName ¶
type EsAggResult ¶
type EsAggResult struct { basedto.BaseEntity AggType AggType `json:"agg_type"` Key string `json:"key"` //"key": "722827384120016897", DocCount int64 `json:"doc_count"` //": 82, StatField string `json:"stat_field"` //"shop_account_id": { Count int `json:"count"` //"count": 3, Min any `json:"min,omitempty"` //: 0.0, Max any `json:"max,omitempty"` //": 7.2344678761876685E17, Avg any `json:"avg,omitempty"` //": 2.41148929206255616E17, Sum any `json:"sum,omitempty"` //": 7.2344678761876685E17 Value any `json:"value,omitempty"` Data any `json:"data,omitempty"` EsAggResultMap map[string]*EsAggResult `json:"agg_map,omitempty"` }
func NewEsAggResult ¶
func NewEsAggResult() *EsAggResult
func (*EsAggResult) FromStatsResult ¶
func (self *EsAggResult) FromStatsResult(stats StatsResult) *EsAggResult
func (*EsAggResult) ToAgg2Result ¶
func (self *EsAggResult) ToAgg2Result(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
func (*EsAggResult) ToAgg2ResultMap ¶
func (self *EsAggResult) ToAgg2ResultMap(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
func (*EsAggResult) ToAgg2ResultOne ¶
func (self *EsAggResult) ToAgg2ResultOne(aggdto *EsAggDto, aggs elastic.Aggregations) *EsAggResult
func (*EsAggResult) Value2Stats ¶
func (self *EsAggResult) Value2Stats()
type EsRequest ¶
type EsRequest struct { basedto.BaseEntity RootDir string `json:"-"` EsClient *ichubelastic.ElasticClient `json:"-"` CmdCategory esconst.CMDTYPE `json:"cmd_category"` ReqDto }
func FindBeanEsRequest ¶
func FindBeanEsRequest() *EsRequest
func NewEsRequest ¶
func NewEsRequest() *EsRequest
func (*EsRequest) FindAnyName ¶
func (*EsRequest) Parse2IndexName ¶
func (this *EsRequest) Parse2IndexName(data baseiface.IbaseProxy)
func (*EsRequest) Save2File ¶
func (this *EsRequest) Save2File(datas ...baseiface.IbaseProxy)
func (*EsRequest) Save2FileBytes ¶
func (this *EsRequest) Save2FileBytes(file string, proxy baseiface.IbaseProxy) error
type EsStats ¶
type EsStats struct { //stats one filed Stats StatsResult `json:"stats,omitempty"` //stats multi fields StatsMap map[string]StatsResult `json:"stats_map,omitempty"` }
func NewEsStats ¶
func NewEsStats() *EsStats
func (*EsStats) Value2Stats ¶
func (*EsStats) Value2StatsMap ¶
type GetResultDto ¶
type GetResultDto struct { basedto.BaseEntity Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id"` Uid string `json:"_uid"` Routing string `json:"_routing"` Parent string `json:"_parent"` Version int `json:"_version"` SeqNo int `json:"_seq_no"` PrimaryTerm int `json:"_primary_term"` Source interface{} `json:"_source"` Found bool `json:"found"` }
func FindBeanGetResultDto ¶
func FindBeanGetResultDto() *GetResultDto
func NewGetResultDto ¶
func NewGetResultDto() *GetResultDto
func (*GetResultDto) As ¶
func (this *GetResultDto) As(out interface{}) *GetResultDto
type QueryGroup ¶
type QueryGroup struct { basedto.BaseEntity EsBoolType int Queries []*elastic.Query }
func FindBeanQueryGroup ¶
func FindBeanQueryGroup() *QueryGroup
func NewQueryGroup ¶
func NewQueryGroup() *QueryGroup
func (*QueryGroup) AddQuery ¶
func (this *QueryGroup) AddQuery(query *elastic.Query)
type QueryList ¶
type QueryList struct { basedto.BaseEntity // contains filtered or unexported fields }
func FindBeanQueryList ¶
func FindBeanQueryList() *QueryList
func NewQueryList ¶
func NewQueryList() *QueryList
func (*QueryList) AppendFields ¶
func (this *QueryList) AppendFields(page *page.PageRequest) []elastic.Query
Click to show internal directories.
Click to hide internal directories.