Documentation ¶
Index ¶
Constants ¶
View Source
const (
ScoreSort = internal.ScoreSorter
)
Variables ¶
View Source
var Sorters = map[int64]esp.EsSorter{ ScoreSort: (*esp.ScoreSorter)(nil), }
Functions ¶
func ConvertAllFieldsSearchQuery ¶
func ConvertAllFieldsSearchQuery(in *pb.SearchOptions_AllFieldsKey) []types.Query
func ConvertMultiFieldsSearchQuery ¶
func ConvertMultiFieldsSearchQuery(in *pb.SearchOptions_MultiFieldsKey) []types.Query
Types ¶
type PostEsModel ¶
type PostEsModel interface { Search(ctx context.Context, query []types.Query, fopts *internal.FilterOptions, popts *paginator.PaginationOptions, sorter int64) ([]*internal.Post, int64, error) CountWithQuery(ctx context.Context, query []types.Query, fopts *internal.FilterOptions) (int64, error) }
func NewPostModel ¶
func NewPostModel(db string, es config.ElasticsearchConf, c cache.CacheConf) PostEsModel
NewPostModel returns a model for the elasticsearch.
Click to show internal directories.
Click to hide internal directories.