Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Highlight ¶
type Highlight struct {
PreTag string `json:"preTag"` //高亮前缀
PostTag string `json:"postTag"` //高亮后缀
}
Highlight 关键词高亮
type IndexDoc ¶
type IndexDoc struct {
Id string `json:"id,omitempty"` //索引ID
Title string `json:"title,omitempty"` //标题
Text string `json:"text,omitempty"` //索引内容
Flag string `json:"flag,omitempty"` //标识
Time string `json:"time,omitempty"` //时间
Tags string `json:"tags,omitempty"` //标签
Seo map[string]interface{} `json:"seo,omitempty"` //补充关键词SEO关键词
Keys map[string]interface{} `json:"keys,omitempty"` //补充关键词支持 如:site:test.com查询
Cut_Document bool `json:"cut_document,omitempty"` //是否对文档进行索引
Document map[string]interface{} `json:"document,omitempty"` //索引文档
}
IndexDoc 索引实体
type NegResult ¶
type NegResult struct {
Time float64 `json:"time,omitempty"` //查询用时
Total int `json:"total"` //总数
PageCount int `json:"pageCount"` //总页数
Page int `json:"page,omitempty"` //页码
Limit int `json:"limit,omitempty"` //页大小
Documents []NegativeDoc `json:"documents,omitempty"` //文档
Words []string `json:"words,omitempty"` //搜索关键词
}
SearchResult 搜索响应
type NegSearch ¶
type NegSearch struct {
Query string `json:"query,omitempty"` // 搜索关键词
Order string `json:"order,omitempty"` // 排序类型
MaxLimit int `json:"maxlimit,omitempty"` // 最大结果集限制,默认1000
Flag string `json:"flag,omitempty"` // 搜索标记
FilterExp string `json:"filterExp,omitempty"` // 过滤计算表达式
ScoreExp string `json:"scoreExp,omitempty"` // 过滤计算表达式
Page int `json:"page,omitempty"` // 页码
Limit int `json:"limit,omitempty"` // 每页大小,最大1000,超过报错
}
NegRequest 搜索请求
func (*NegSearch) GetAndSetDefault ¶
type Neg_Option ¶
type NegativeDoc ¶
type RemoveIndexModel ¶
type RemoveIndexModel struct {
Id string `json:"id,omitempty"`
}
type RemoveNegativeModel ¶
type RemoveNegativeModel struct {
Id string `json:"id,omitempty"`
}
type ResponseDoc ¶
type ResponseDoc struct {
IndexDoc
OriginalText string `json:"originalText,omitempty"`
OriginalTitle string `json:"originalTitle,omitempty"`
Flag string `json:"flag,omitempty"`
Time string `json:"time,omitempty"`
Tags string `json:"tags,omitempty"`
Score int `json:"score,omitempty"` //得分
Keys []string `json:"keys,omitempty"`
}
type ResponseDocSort ¶
type ResponseDocSort []ResponseDoc
func (ResponseDocSort) Len ¶
func (r ResponseDocSort) Len() int
func (ResponseDocSort) Less ¶
func (r ResponseDocSort) Less(i, j int) bool
func (ResponseDocSort) Swap ¶
func (r ResponseDocSort) Swap(i, j int)
type SearchRequest ¶
type SearchRequest struct {
Query string `json:"query,omitempty" form:"database"` // 搜索关键词
Order string `json:"order,omitempty" form:"database"` // 排序类型
ScoreExp string `json:"scoreExp,omitempty" form:"scoreExp"` // 分数计算表达式
MaxLimit int `json:"maxlimit,omitempty" form:"maxlimit"` // 最大结果集限制,默认1000
FilterExp string `json:"filterExp,omitempty" form:"filterExp"` // 过滤计算表达式
Negative Neg_Option `json:"negative,omitempty"` // 负面项过滤开关
Page int `json:"page,omitempty" form:"database"` // 页码
Limit int `json:"limit,omitempty" form:"database"` // 每页大小,最大1000,超过报错
Highlight *Highlight `json:"highlight,omitempty" form:"database"` // 关键词高亮
Database string `json:"database" form:"database"` // 数据库名字
}
SearchRequest 搜索请求
func (*SearchRequest) GetAndSetDefault ¶
func (s *SearchRequest) GetAndSetDefault() *SearchRequest
type SearchResult ¶
type SearchResult struct {
Time float64 `json:"time,omitempty"` //查询用时
Total int `json:"total"` //总数
PageCount int `json:"pageCount"` //总页数
Page int `json:"page,omitempty"` //页码
Limit int `json:"limit,omitempty"` //页大小
Documents []ResponseDoc `json:"documents,omitempty"` //文档
Words []string `json:"words,omitempty"` //搜索关键词
}
SearchResult 搜索响应
type StorageIndexDoc ¶
StorageIndexDoc 文档对象
Click to show internal directories.
Click to hide internal directories.