Documentation ¶
Index ¶
- Constants
- func InjectCmdRequest(s *CmdRequest)
- func InjectIchubQueryRequest(s *QueryRequest)
- func LoadCmdRequest() baseiface.ISingleton
- func LoadIchubQueryRequest() baseiface.ISingleton
- type CmdRequest
- func (self *CmdRequest) BulkCreate() (*elastic.BulkResponse, error)
- func (self *CmdRequest) BulkDelete() (int, error)
- func (self *CmdRequest) BulkDocAsUpsert() (*elastic.BulkResponse, error)
- func (self *CmdRequest) BulkIndex() (*elastic.BulkResponse, error)
- func (self *CmdRequest) BulkScriptUpsert() (*elastic.BulkResponse, error)
- func (self *CmdRequest) BulkUpdate() (*elastic.BulkResponse, error)
- func (self *CmdRequest) CopyFromDb(tableName string, pkField ...string) error
- func (self *CmdRequest) Delete() (*elastic.DeleteResponse, error)
- func (self *CmdRequest) DeleteByQuery() (int64, error)
- func (self *CmdRequest) DocAsUpsert() (*elastic.UpdateResponse, error)
- func (self *CmdRequest) Execute() *basedto.IchubResult
- func (self *CmdRequest) InsertIfNotExists() *basedto.IchubResult
- func (self *CmdRequest) Query2QueryRequest(q elastic.Query) (*QueryRequest, error)
- func (self *CmdRequest) QueryRequestFrom(q elastic.Query) error
- func (self *CmdRequest) SaveIndex(id string, model interface{}) (*elastic.IndexResponse, error)
- func (self *CmdRequest) SaveIndexData() (*elastic.IndexResponse, error)
- func (self *CmdRequest) Script2Dto(script *elastic.Script) *cmddto.EsScriptDto
- func (self *CmdRequest) SetIndexName(IndexName string) *CmdRequest
- func (self *CmdRequest) Update() (*elastic.UpdateResponse, error)
- func (self *CmdRequest) UpdateByQuery() (*elastic.BulkIndexByScrollResponse, error)
- func (self *CmdRequest) Upsert() (*elastic.UpdateResponse, error)
- type KeyWorkRequest
- func (this *KeyWorkRequest) Analyze() (*elastic.IndicesAnalyzeResponse, error)
- func (this *KeyWorkRequest) Execute() (interface{}, error)
- func (this *KeyWorkRequest) IndexAnalyze(text string) (*elastic.IndicesAnalyzeResponse, error)
- func (this *KeyWorkRequest) IndexAnalyzeToken(token string, text string) (*elastic.IndicesAnalyzeResponse, error)
- func (this *KeyWorkRequest) IndexAnalyzeWord(r *splitword.SplitWordRequest) (*elastic.IndicesAnalyzeResponse, error)
- type MetadataRequest
- func (this *MetadataRequest) CreateAlias() (*basedto.IchubResult, error)
- func (this *MetadataRequest) CreateIndex() (bool, error)
- func (this *MetadataRequest) CreateIndexMapping(mapping string) (bool, error)
- func (this *MetadataRequest) DefineIndexField(name, Type string)
- func (this *MetadataRequest) DropIndex() (*elastic.IndicesDeleteResponse, error)
- func (this *MetadataRequest) Execute() (interface{}, error)
- func (this *MetadataRequest) GetMapping() (map[string]any, error)
- func (this *MetadataRequest) IndexExist() (bool, error)
- func (this *MetadataRequest) ToMetadata() *indexmeta.EsIndexMeta
- type QueryRequest
- func (self *QueryRequest) Aggregation(name string, aggregation elastic.Aggregation) *QueryRequest
- func (self *QueryRequest) Check() error
- func (self *QueryRequest) EsStats(statField string, size ...int) *QueryRequest
- func (qr *QueryRequest) Execute() (*pagees.PageEsResult, error)
- func (qr *QueryRequest) Filter() (*pagees.PageEsResult, error)
- func (qr *QueryRequest) Get() *basedto.IchubResult
- func (qr *QueryRequest) Get2PageEsResult() *pagees.PageEsResult
- func (qr *QueryRequest) IfGet() bool
- func (qr *QueryRequest) IfQuery() bool
- func (self *QueryRequest) IfServerHttpcliBodyEmpty() bool
- func (qr *QueryRequest) IsMust() bool
- func (self *QueryRequest) Models() any
- func (qr *QueryRequest) Must() (*pagees.PageEsResult, error)
- func (qr *QueryRequest) MustNot() (*pagees.PageEsResult, error)
- func (qr *QueryRequest) Query() (*pagees.PageEsResult, error)
- func (self *QueryRequest) QuerySource() *pagees.PageEsResult
- func (self *QueryRequest) QuerySourceAs(models any) *pagees.PageEsResult
- func (self *QueryRequest) QuerySourceBody() *QueryRequest
- func (self *QueryRequest) SearchSources() map[string]any
- func (self *QueryRequest) SetIndexAlias(alias string) *QueryRequest
- func (self *QueryRequest) SetIndexName(IndexName string) *QueryRequest
- func (self *QueryRequest) SetModels(models any)
- func (self *QueryRequest) SetPageCurrent(PageCurrent int) *QueryRequest
- func (self *QueryRequest) SetPageSize(PageSize int) *QueryRequest
- func (self *QueryRequest) SetPretty(pretty bool) *QueryRequest
- func (this *QueryRequest) SetQueryEmpty(queryEmpty bool) *QueryRequest
- func (this *QueryRequest) SetQueryZero(queryEmpty bool) *QueryRequest
- func (self *QueryRequest) SetSearchSources(key string, value any) *QueryRequest
- func (self *QueryRequest) SetSource(Source string) *QueryRequest
- func (qr *QueryRequest) Should() (*pagees.PageEsResult, error)
- func (self *QueryRequest) Sort2Source(v []elastic.Sorter) *QueryRequest
Constants ¶
View Source
const HttpCliMax = esconst.MAX_ES_RECORD_NUMBER
Term-level queries exists query 字段是否存在值 fuzzy query 模糊查询 ids query ID 查询 prefix query 前缀查询 range query 范围查询 regexp query 正则查询 term query 精确匹配单个字段 terms query 精确匹配单个字段,但使用多值进行匹配,类似于 SQL 中的 in 操作 terms_set query 字段集合查询。文档需包含字段集合中指定的最少数量字段 wildcard query 通配符查询 Full-text queries match query 单字段搜索(匹配分词结果,不需要全文匹配) Specialized queries script query 脚本查询
Variables ¶
This section is empty.
Functions ¶
func InjectCmdRequest ¶
func InjectCmdRequest(s *CmdRequest)
func InjectIchubQueryRequest ¶
func InjectIchubQueryRequest(s *QueryRequest)
func LoadCmdRequest ¶
func LoadCmdRequest() baseiface.ISingleton
func LoadIchubQueryRequest ¶
func LoadIchubQueryRequest() baseiface.ISingleton
Types ¶
type CmdRequest ¶
type CmdRequest struct { *cmddto.CmdDto *QueryRequest }
func DefaultCmd ¶
func DefaultCmd() *CmdRequest
func FindBeanCmdRequest ¶
func FindBeanCmdRequest() *CmdRequest
func NewCmdRequest ¶
func NewCmdRequest() *CmdRequest
func (*CmdRequest) BulkCreate ¶
func (self *CmdRequest) BulkCreate() (*elastic.BulkResponse, error)
Execute
https://apim.docs.wso2.com/en/latest/design/advanced-topics/enabling-cors-for-apis/
func (*CmdRequest) BulkDelete ¶
func (self *CmdRequest) BulkDelete() (int, error)
func (*CmdRequest) BulkDocAsUpsert ¶
func (self *CmdRequest) BulkDocAsUpsert() (*elastic.BulkResponse, error)
func (*CmdRequest) BulkIndex ¶
func (self *CmdRequest) BulkIndex() (*elastic.BulkResponse, error)
func (*CmdRequest) BulkScriptUpsert ¶
func (self *CmdRequest) BulkScriptUpsert() (*elastic.BulkResponse, error)
func (*CmdRequest) BulkUpdate ¶
func (self *CmdRequest) BulkUpdate() (*elastic.BulkResponse, error)
Add(elastic.NewBulkUpdateRequest().Id(this.Id).Doc(this.Doc)).
func (*CmdRequest) CopyFromDb ¶
func (self *CmdRequest) CopyFromDb(tableName string, pkField ...string) error
func (*CmdRequest) Delete ¶
func (self *CmdRequest) Delete() (*elastic.DeleteResponse, error)
func (*CmdRequest) DeleteByQuery ¶
func (self *CmdRequest) DeleteByQuery() (int64, error)
func (*CmdRequest) DocAsUpsert ¶
func (self *CmdRequest) DocAsUpsert() (*elastic.UpdateResponse, error)
func (*CmdRequest) Execute ¶
func (self *CmdRequest) Execute() *basedto.IchubResult
func (*CmdRequest) InsertIfNotExists ¶
func (self *CmdRequest) InsertIfNotExists() *basedto.IchubResult
func (*CmdRequest) Query2QueryRequest ¶
func (self *CmdRequest) Query2QueryRequest(q elastic.Query) (*QueryRequest, error)
func (*CmdRequest) QueryRequestFrom ¶
func (self *CmdRequest) QueryRequestFrom(q elastic.Query) error
func (*CmdRequest) SaveIndex ¶
func (self *CmdRequest) SaveIndex(id string, model interface{}) (*elastic.IndexResponse, error)
func (*CmdRequest) SaveIndexData ¶
func (self *CmdRequest) SaveIndexData() (*elastic.IndexResponse, error)
func (*CmdRequest) Script2Dto ¶
func (self *CmdRequest) Script2Dto(script *elastic.Script) *cmddto.EsScriptDto
func (*CmdRequest) SetIndexName ¶
func (self *CmdRequest) SetIndexName(IndexName string) *CmdRequest
func (*CmdRequest) Update ¶
func (self *CmdRequest) Update() (*elastic.UpdateResponse, error)
func (*CmdRequest) UpdateByQuery ¶
func (self *CmdRequest) UpdateByQuery() (*elastic.BulkIndexByScrollResponse, error)
func (*CmdRequest) Upsert ¶
func (self *CmdRequest) Upsert() (*elastic.UpdateResponse, error)
type KeyWorkRequest ¶
func DefaultKeyword ¶
func DefaultKeyword() *KeyWorkRequest
func NewKeyworkRequest ¶
func NewKeyworkRequest() *KeyWorkRequest
func (*KeyWorkRequest) Analyze ¶
func (this *KeyWorkRequest) Analyze() (*elastic.IndicesAnalyzeResponse, error)
func (*KeyWorkRequest) Execute ¶
func (this *KeyWorkRequest) Execute() (interface{}, error)
func (*KeyWorkRequest) IndexAnalyze ¶
func (this *KeyWorkRequest) IndexAnalyze(text string) (*elastic.IndicesAnalyzeResponse, error)
func (*KeyWorkRequest) IndexAnalyzeToken ¶
func (this *KeyWorkRequest) IndexAnalyzeToken(token string, text string) (*elastic.IndicesAnalyzeResponse, error)
func (*KeyWorkRequest) IndexAnalyzeWord ¶
func (this *KeyWorkRequest) IndexAnalyzeWord(r *splitword.SplitWordRequest) (*elastic.IndicesAnalyzeResponse, error)
type MetadataRequest ¶
type MetadataRequest struct { esdto.EsRequest Fields map[string]string `json:"fields"` Mappings string `json:"mappings"` }
func DefaultMetadata ¶
func DefaultMetadata() *MetadataRequest
func NewMetadataRequest ¶
func NewMetadataRequest() *MetadataRequest
func (*MetadataRequest) CreateAlias ¶
func (this *MetadataRequest) CreateAlias() (*basedto.IchubResult, error)
func (*MetadataRequest) CreateIndex ¶
func (this *MetadataRequest) CreateIndex() (bool, error)
func (*MetadataRequest) CreateIndexMapping ¶
func (this *MetadataRequest) CreateIndexMapping(mapping string) (bool, error)
func (*MetadataRequest) DefineIndexField ¶
func (this *MetadataRequest) DefineIndexField(name, Type string)
func (*MetadataRequest) DropIndex ¶
func (this *MetadataRequest) DropIndex() (*elastic.IndicesDeleteResponse, error)
func (*MetadataRequest) Execute ¶
func (this *MetadataRequest) Execute() (interface{}, error)
func (*MetadataRequest) GetMapping ¶
func (this *MetadataRequest) GetMapping() (map[string]any, error)
func (*MetadataRequest) IndexExist ¶
func (this *MetadataRequest) IndexExist() (bool, error)
func (*MetadataRequest) ToMetadata ¶
func (this *MetadataRequest) ToMetadata() *indexmeta.EsIndexMeta
type QueryRequest ¶
type QueryRequest struct { *pagees.PageEsRequest // contains filtered or unexported fields }
func Default ¶
func Default() *QueryRequest
func FindBeanIchubQueryRequest ¶
func FindBeanIchubQueryRequest() *QueryRequest
func New ¶
func New(pageSize, pageCurrent int) *QueryRequest
func NewQueryRequest ¶
func NewQueryRequest() *QueryRequest
func (*QueryRequest) Aggregation ¶
func (self *QueryRequest) Aggregation(name string, aggregation elastic.Aggregation) *QueryRequest
func (*QueryRequest) Check ¶
func (self *QueryRequest) Check() error
func (*QueryRequest) EsStats ¶
func (self *QueryRequest) EsStats(statField string, size ...int) *QueryRequest
func (*QueryRequest) Execute ¶
func (qr *QueryRequest) Execute() (*pagees.PageEsResult, error)
func (*QueryRequest) Filter ¶
func (qr *QueryRequest) Filter() (*pagees.PageEsResult, error)
func (*QueryRequest) Get ¶
func (qr *QueryRequest) Get() *basedto.IchubResult
func (*QueryRequest) Get2PageEsResult ¶
func (qr *QueryRequest) Get2PageEsResult() *pagees.PageEsResult
func (*QueryRequest) IfGet ¶
func (qr *QueryRequest) IfGet() bool
func (*QueryRequest) IfQuery ¶
func (qr *QueryRequest) IfQuery() bool
func (*QueryRequest) IfServerHttpcliBodyEmpty ¶
func (self *QueryRequest) IfServerHttpcliBodyEmpty() bool
func (*QueryRequest) IsMust ¶
func (qr *QueryRequest) IsMust() bool
func (*QueryRequest) Models ¶
func (self *QueryRequest) Models() any
func (*QueryRequest) Must ¶
func (qr *QueryRequest) Must() (*pagees.PageEsResult, error)
func (*QueryRequest) MustNot ¶
func (qr *QueryRequest) MustNot() (*pagees.PageEsResult, error)
func (*QueryRequest) Query ¶
func (qr *QueryRequest) Query() (*pagees.PageEsResult, error)
func (*QueryRequest) QuerySource ¶
func (self *QueryRequest) QuerySource() *pagees.PageEsResult
func (*QueryRequest) QuerySourceAs ¶
func (self *QueryRequest) QuerySourceAs(models any) *pagees.PageEsResult
func (*QueryRequest) QuerySourceBody ¶
func (self *QueryRequest) QuerySourceBody() *QueryRequest
func (*QueryRequest) SearchSources ¶
func (self *QueryRequest) SearchSources() map[string]any
func (*QueryRequest) SetIndexAlias ¶
func (self *QueryRequest) SetIndexAlias(alias string) *QueryRequest
func (*QueryRequest) SetIndexName ¶
func (self *QueryRequest) SetIndexName(IndexName string) *QueryRequest
func (*QueryRequest) SetModels ¶
func (self *QueryRequest) SetModels(models any)
func (*QueryRequest) SetPageCurrent ¶
func (self *QueryRequest) SetPageCurrent(PageCurrent int) *QueryRequest
func (*QueryRequest) SetPageSize ¶
func (self *QueryRequest) SetPageSize(PageSize int) *QueryRequest
func (*QueryRequest) SetPretty ¶
func (self *QueryRequest) SetPretty(pretty bool) *QueryRequest
func (*QueryRequest) SetQueryEmpty ¶
func (this *QueryRequest) SetQueryEmpty(queryEmpty bool) *QueryRequest
func (*QueryRequest) SetQueryZero ¶
func (this *QueryRequest) SetQueryZero(queryEmpty bool) *QueryRequest
func (*QueryRequest) SetSearchSources ¶
func (self *QueryRequest) SetSearchSources(key string, value any) *QueryRequest
func (*QueryRequest) SetSource ¶
func (self *QueryRequest) SetSource(Source string) *QueryRequest
func (*QueryRequest) Should ¶
func (qr *QueryRequest) Should() (*pagees.PageEsResult, error)
func (*QueryRequest) Sort2Source ¶
func (self *QueryRequest) Sort2Source(v []elastic.Sorter) *QueryRequest
Source Files ¶
Click to show internal directories.
Click to hide internal directories.