Hi,
I want some help to know how to reach product directly. I read about
But after review the patch is already set to my vsf.
I’m using vsf 1.12.2 and vsf-api 1.12.3, elasticsearch 7.3.2
The vsf-api config is the follow
{
"server": {
"host": "localhost",
"port": 8080,
"searchEngine": "elasticsearch",
"useOutputCacheTagging": false,
"useOutputCache": false,
"outputCacheDefaultTtl": 86400,
"availableCacheTags": [
"P",
"C",
"T",
"A",
"product",
"category",
"attribute",
"taxrule"
],
"invalidateCacheKey": "aeSu7aip",
"invalidateCacheForwarding": false,
"invalidateCacheForwardUrl": "http://localhost:3000/invalidate?key=aeSu7aip&tag=",
"showErrorStack": true
},
"users": {
"tokenInHeader": false
},
"orders": {
"useServerQueue": false
},
"catalog": {
"excludeDisabledProducts": false
},
"elasticsearch": {
"host": "localhost",
"index": "vue_storefront_catalog",
"port": 9200,
"protocol": "http",
"requestTimeout": 5000,
"min_score": 0.01,
"indices": [
"vue_storefront_catalog",
"vue_storefront_catalog_de",
"vue_storefront_catalog_it"
],
"indexTypes": [
"product",
"category",
"cms_block",
"cms_page",
"attribute",
"taxrule",
"review"
],
"apiVersion": "7.3",
"useRequestFilter": false,
"overwriteRequestSourceParams": false,
"requestParamsBlacklist": [],
"cacheRequest": false,
"searchScoring": {
"attributes": {
"attribute_code": {
"scoreValues": { "attribute_value": { "weight": 1 } }
}
},
"fuzziness": 2,
"cutoff_frequency": 0.01,
"max_expansions": 3,
"minimum_should_match": "75%",
"prefix_length": 2,
"boost_mode": "multiply",
"score_mode": "multiply",
"max_boost": 100,
"function_min_score": 1
},
"searchableAttributes": {
"name": {
"boost": 4
},
"sku": {
"boost": 2
},
"category.name": {
"boost": 1
}
}
},
"products": {
"fieldsToCompress": ["max_regular_price", "max_price", "max_regular_price", "minimal_regular_price", "final_price", "price", "special_price", "original_final_price", "original_price", "original_special_price", "final_price_incl_tax", "price_incl_tax", "special_price_incl_tax", "final_price_tax", "price_tax", "special_price_tax", "image", "small_image", "thumbnail"],
"fieldsToCompact": {
"minimal_price": "mp",
"has_options": "ho",
"url_key": "u",
"status": "s",
"required_options": "ro",
"name": "nm",
"tax_class_id": "tci",
"description": "desc",
"minimal_regular_price": "mrp",
"final_price": "fp",
"price": "p",
"special_price": "sp",
"original_final_price": "ofp",
"original_price": "op",
"original_special_price": "osp",
"final_price_incl_tax": "fpit",
"original_price_incl_tax": "opit",
"price_incl_tax": "pit",
"special_price_incl_tax": "spit",
"final_price_tax": "fpt",
"price_tax": "pt",
"special_price_tax": "spt",
"original_price_tax": "opt",
"image": "i",
"small_image": "si",
"thumbnail": "t"
},
"filterFieldMapping": {
"category.name": "category.name.keyword"
},
"filterAggregationSize": {
"default": 10,
"size": 10,
"color": 10
},
"priceFilterKey": "final_price",
"priceFilters": {
"ranges": [
{ "from": 0, "to": 50 },
{ "from": 50, "to": 100 },
{ "from": 100, "to": 150 },
{ "from": 150 }
]
}
},
"redis": {
"host": "localhost",
"port": 6379,
"db": 0,
"auth": false
},
"kue": {},
"availableStores": [
"es",
"it"
],
"msi": {
"enabled": false,
"defaultStockId": 1
},
"storeViews": {
"multistore": false,
"mapStoreUrlsFor": [
"es",
"it"
],
"es": {
"storeCode": "es",
"disabled": false,
"storeId": 3,
"websiteId": 1,
"name": "Spanish Store",
"url": "/es",
"elasticsearch": {
"host": "localhost:8080/api/catalog",
"index": "vue_storefront_catalog_es"
},
"msi": {
"stockId": 2
},
"tax": {
"defaultCountry": "GT",
"defaultRegion": "",
"deprecatedPriceFieldsSupport": false,
"calculateServerSide": true,
"sourcePriceIncludesTax": false,
"finalPriceIncludesTax": true,
"userGroupId": null,
"useOnlyDefaultUserGroupId": false
},
"i18n": {
"fullCountryName": "Guatemala",
"fullLanguageName": "Spanish",
"defaultLanguage": "ES",
"defaultCountry": "GT",
"defaultLocale": "es-GT",
"currencyCode": "GTQ",
"currencySign": "GTQ",
"dateFormat": "HH:mm D-M-YYYY"
}
},
"it": {
"storeCode": "it",
"disabled": false,
"storeId": 4,
"websiteId": 1,
"name": "Italian Store",
"url": "/it",
"elasticsearch": {
"host": "localhost:8080/api/catalog",
"index": "vue_storefront_catalog_it"
},
"msi": {
"stockId": 2
},
"tax": {
"defaultCountry": "IT",
"defaultRegion": "",
"calculateServerSide": true,
"sourcePriceIncludesTax": false,
"deprecatedPriceFieldsSupport": true,
"finalPriceIncludesTax": true,
"userGroupId": null,
"useOnlyDefaultUserGroupId": false
},
"i18n": {
"fullCountryName": "Italy",
"fullLanguageName": "Italian",
"defaultCountry": "IT",
"defaultLanguage": "IT",
"defaultLocale": "it-IT",
"currencyCode": "EUR",
"currencySign": "EUR",
"dateFormat": "HH:mm D-M-YYYY"
}
}
},
"authHashSecret": "MYSQL@3ll1988",
"objHashSecret": "YOAMOAJESUS@1988",
"cart": {
"setConfigurableProductOptions": false
},
"tax": {
"defaultCountry": "GT",
"defaultRegion": "",
"calculateServerSide": true,
"alwaysSyncPlatformPricesOver": false,
"usePlatformTotals": true,
"setConfigurableProductOptions": true,
"sourcePriceIncludesTax": false,
"deprecatedPriceFieldsSupport": true,
"finalPriceIncludesTax": false,
"userGroupId": null,
"useOnlyDefaultUserGroupId": false
},
"review": {
"defaultReviewStatus": 2
},
"bodyLimit": "100kb",
"corsHeaders": [
"Link"
],
"platform": "magento2",
"registeredExtensions": [
"mailchimp-subscribe",
"example-magento-api",
"cms-data",
"mail-service",
"example-processor",
"elastic-stock"
],
"extensions": {
"mailchimp": {
"listId": "",
"apiKey": "",
"apiUrl": "",
"userStatus": ""
},
"mailService": {
"transport": {
"host": "",
"port": 465,
"secure": true,
"user": "",
"pass": ""
},
"targetAddressWhitelist": [
"",
""
],
"secretString": ""
},
"example-processor": {
"resultProcessors": {
"product": "my-product-processor"
}
}
},
"magento2": {
"imgUrl": "/api/static/img",
"assetPath": "/../var/magento2-sample-data/pub/media",
"api": {
"url": "http://demo-magento2.vuestorefront.io/rest",
"consumerKey": "byv3730rhoulpopcq64don8ukb8lf2gq",
"consumerSecret": "u9q4fcobv7vfx9td80oupa6uhexc27rb",
"accessToken": "040xx3qy7s0j28o3q0exrfop579cy20m",
"accessTokenSecret": "7qunl3p505rubmr7u1ijt7odyialnih9"
}
},
"magento1": {
"imgUrl": "/api/static/img",
"assetPath": "",
"magentoUserName": "",
"magentoUserPassword": "",
"httpUserName": "",
"httpUserPassword": "",
"api": {
"url": "http://magento-demo.local/vsbridge",
"consumerKey": "",
"consumerSecret": "",
"accessToken": "",
"accessTokenSecret": ""
}
},
"imageable": {
"maxListeners": 512,
"imageSizeLimit": 1024,
"whitelist": {
"allowedHosts": [
".*divante.pl",
".*vuestorefront.io"
]
},
"cache": {
"memory": 50,
"files": 20,
"items": 100
},
"concurrency": 0,
"counters": {
"queue": 2,
"process": 4
},
"simd": true,
"caching": {
"active": false,
"type": "file",
"file": {
"path": "/tmp/vue-storefront-api"
},
"google-cloud-storage": {
"libraryOptions": {},
"bucket": "",
"prefix": "vue-storefront-api/image-cache"
}
},
"action": {
"type": "local"
}
},
"entities": {
"category": {
"includeFields": [
"children_data",
"id",
"children_count",
"sku",
"name",
"is_active",
"parent_id",
"level",
"url_key"
]
},
"attribute": {
"includeFields": [
"attribute_code",
"id",
"entity_type_id",
"options",
"default_value",
"is_user_defined",
"frontend_label",
"attribute_id",
"default_frontend_label",
"is_visible_on_front",
"is_visible",
"is_comparable"
]
},
"productList": {
"sort": "",
"includeFields": [
"type_id",
"sku",
"product_links",
"tax_class_id",
"special_price",
"special_to_date",
"special_from_date",
"name",
"price",
"priceInclTax",
"originalPriceInclTax",
"originalPrice",
"specialPriceInclTax",
"id",
"image",
"sale",
"new",
"url_key"
],
"excludeFields": [
"configurable_children",
"description",
"configurable_options",
"sgn"
]
},
"productListWithChildren": {
"includeFields": [
"type_id",
"sku",
"name",
"tax_class_id",
"special_price",
"special_to_date",
"special_from_date",
"price",
"priceInclTax",
"originalPriceInclTax",
"originalPrice",
"specialPriceInclTax",
"id",
"image",
"sale",
"new",
"configurable_children.image",
"configurable_children.sku",
"configurable_children.price",
"configurable_children.special_price",
"configurable_children.priceInclTax",
"configurable_children.specialPriceInclTax",
"configurable_children.originalPrice",
"configurable_children.originalPriceInclTax",
"configurable_children.color",
"configurable_children.size",
"product_links",
"url_key"
],
"excludeFields": [
"description",
"sgn"
]
},
"product": {
"excludeFields": [
"updated_at",
"created_at",
"attribute_set_id",
"status",
"visibility",
"tier_prices",
"options_container",
"msrp_display_actual_price_type",
"has_options",
"stock.manage_stock",
"stock.use_config_min_qty",
"stock.use_config_notify_stock_qty",
"stock.stock_id",
"stock.use_config_backorders",
"stock.use_config_enable_qty_inc",
"stock.enable_qty_increments",
"stock.use_config_manage_stock",
"stock.use_config_min_sale_qty",
"stock.notify_stock_qty",
"stock.use_config_max_sale_qty",
"stock.use_config_max_sale_qty",
"stock.qty_increments",
"small_image"
],
"includeFields": null,
"filterFieldMapping": {
"category.name": "category.name.keyword"
}
}
},
"usePriceTiers": false,
"boost": {
"name": 3,
"category.name": 1,
"short_description": 1,
"description": 1,
"sku": 1,
"configurable_children.sku": 1
},
"urlModule": {
"map": {
"includeFields": ["url_path", "identifier", "id", "slug", "sku", "type_id"],
"searchedFields": ["url_path", "identifier"],
"searchedEntities": ["product", "category", "cms_page"]
}
}
}
I used the follow commands to configure vsf-api
yarn
yarn build
yarn db new
yarn dev (or yarn start)
But without success on direct search, all work fine with previous search in search form.