Documentation
¶
Index ¶
- type CoreSearchService
- type ProductSearchService
- func (p ProductSearchService) Create(id int64) (*es_index.EsProduct, error)
- func (p ProductSearchService) Delete(id int64) (bool, error)
- func (p ProductSearchService) DeleteBatch(ids []int64) (bool, error)
- func (p ProductSearchService) ImportAll() error
- func (p ProductSearchService) SearchById(id int64, pageNum, pageSize int) (*pkg.CommonPage, error)
- func (p ProductSearchService) SearchByNameOrSubtitle(keyword string, brandId int64, productCategoryId int64, ...) (*pkg.CommonPage, error)
- func (p ProductSearchService) SearchByNameOrSubtitleOrKeyword(keyword string, pageNum int, pageSize int) (*pkg.CommonPage, error)
- func (p ProductSearchService) SearchRelate(keyword string) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreSearchService ¶
type CoreSearchService struct {
ProductSearchService
}
func NewCoreSearchService ¶
func NewCoreSearchService(dbFactory *database.DbFactory) *CoreSearchService
type ProductSearchService ¶
func NewProductSearchService ¶
func NewProductSearchService(dbFactory *database.DbFactory) ProductSearchService
func (ProductSearchService) Create ¶
func (p ProductSearchService) Create(id int64) (*es_index.EsProduct, error)
Create 根据id创建商品
func (ProductSearchService) Delete ¶
func (p ProductSearchService) Delete(id int64) (bool, error)
Delete 根据 id 删除商品
func (ProductSearchService) DeleteBatch ¶
func (p ProductSearchService) DeleteBatch(ids []int64) (bool, error)
DeleteBatch 根据 id 批量删除商品
func (ProductSearchService) ImportAll ¶
func (p ProductSearchService) ImportAll() error
ImportAll 将所有商品导入到 es
func (ProductSearchService) SearchById ¶
func (p ProductSearchService) SearchById(id int64, pageNum, pageSize int) (*pkg.CommonPage, error)
SearchById 根据商品id推荐商品
func (ProductSearchService) SearchByNameOrSubtitle ¶
func (p ProductSearchService) SearchByNameOrSubtitle(keyword string, brandId int64, productCategoryId int64, sort, pageNum, pageSize int) (*pkg.CommonPage, error)
SearchByNameOrSubtitle 根据关键字或者副标题进行复合查询
func (ProductSearchService) SearchByNameOrSubtitleOrKeyword ¶
func (p ProductSearchService) SearchByNameOrSubtitleOrKeyword(keyword string, pageNum int, pageSize int) (*pkg.CommonPage, error)
SearchByNameOrSubtitleOrKeyword 根据关键字搜索名称或者副标题
func (ProductSearchService) SearchRelate ¶
func (p ProductSearchService) SearchRelate(keyword string) (any, error)
SearchRelate 获取搜索的相关品牌、分类及筛选属性
Click to show internal directories.
Click to hide internal directories.