Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 0d7f1b7

Browse files
author
tkostuch
committed
Add default ES index to config and update getStockList
1 parent d0fe40b commit 0d7f1b7

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Then, please do change the `config/local.json` to start using the new Elastic AP
8585
```json
8686
"elasticsearch": {
8787
"host": "localhost",
88+
"index": "vue_storefront_catalog",
8889
"port": 9200,
8990
"protocol": "http",
9091
"min_score": 0.01,

config/default.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
"elasticsearch": {
2121
"host": "localhost",
22+
"index": "vue_storefront_catalog",
2223
"port": 9200,
2324
"protocol": "http",
2425
"min_score": 0.01,

src/api/extensions/elastic-stock/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = ({
1212
const getStockList = (storeCode, skus) => {
1313
let storeView = getCurrentStoreView(storeCode)
1414
const esQuery = adjustQuery({
15-
index: storeView.elasticsearch.indexName, // current index name
15+
index: storeView.elasticsearch.index, // current index name
1616
type: 'product',
1717
_source_includes: ['stock'],
1818
body: bodybuilder().filter('terms', 'visibility', [2, 3, 4]).andFilter('term', 'status', 1).andFilter('terms', 'sku', skus).build()

0 commit comments

Comments
 (0)