search

package
v0.0.0-...-3bb7120 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INDEXPRODUCTS       = "products"
	INDEXCATEGORIES     = "categories"
	INDEXSTORES         = "stores"
	INDEXPRODUCTQUERIES = "product_queries"
)

Variables

View Source
var ErrNoSearchResults = errors.New("no search results found")

Functions

This section is empty.

Types

type ProductResults

type ProductResults struct {
	Products    []anor.Product
	CategoryIDs []int32
	PriceRange  [2]decimal.Decimal
	Brands      []string
}

type ProductsParams

type ProductsParams struct {
	Filter anor.FilterParam
	Sort   anor.SortParam
	Paging anor.Paging
}

type QuerySuggestionResults

type QuerySuggestionResults struct {
	ProductNameSuggestions []string
	Categories             []anor.Category
	SellerStores           []anor.Store
}

type Searcher

type Searcher interface {
	SearchQuerySuggestions(ctx context.Context, q string) (QuerySuggestionResults, error)
	SearchProducts(ctx context.Context, q string, params ProductsParams) (ProductResults, int64, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL