add: abstract search functionality to core + adjust meilisearch-plugin
add SearchService interface to medusa-interfaces add DefaultSearchService skeleton implementation to core add search-index.js loader to core for indexing db documents add SearchSubscriber to core add loadToSearchEngine method in ProductService switch order of loaders in core to load subscriptions AFTER plugins adjust service and loader for medusa-plugin-meilisearch
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
export const flattenSkus = (product) => {
|
||||
const skus = product.variants.map((v) => v.sku).filter(Boolean)
|
||||
product.sku = skus
|
||||
return product
|
||||
}
|
||||
|
||||
export const defaultProductFields = [
|
||||
"id",
|
||||
"title",
|
||||
"subtitle",
|
||||
"description",
|
||||
"handle",
|
||||
"is_giftcard",
|
||||
"discountable",
|
||||
"thumbnail",
|
||||
"profile_id",
|
||||
"collection_id",
|
||||
"type_id",
|
||||
"origin_country",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
]
|
||||
|
||||
export const defaultProductRelations = [
|
||||
"variants",
|
||||
"tags",
|
||||
"type",
|
||||
"collection",
|
||||
]
|
||||
Reference in New Issue
Block a user