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

Commit 33f7623

Browse files
committed
import, types
1 parent afd38f9 commit 33f7623

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

config/elastic.schema.category.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"is_active": {"type": "boolean"},
77
"product_count": {"type": "integer"},
88
"parent_id": {"type": "integer"},
9-
"position": {"type": "long"},
10-
"created_at": {
11-
"type": "date",
9+
"position": {"type": "integer"},
10+
"created_at": {
11+
"type": "date",
1212
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
1313
},
14-
"updated_at": {
15-
"type": "date",
14+
"updated_at": {
15+
"type": "date",
1616
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
1717
}
1818
}

src/db.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import config from 'config'
2-
import * as redis from '../src/lib/redis'
3-
import * as elastic from '../src/lib/elastic'
2+
import * as redis from './lib/redis'
3+
import * as elastic from './lib/elastic'
44

55
export default callback => {
66
// connect to a database if needed, then pass it to `callback`:

src/graphql/elasticsearch/attribute/resolver.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ async function listAttributes (attributes, context, rootValue, _sourceIncludes)
1616
body: query,
1717
_sourceIncludes
1818
};
19-
if (parseInt(config.elasticsearch.apiVersion) < 6) {
20-
esQuery.type = config.elasticsearch.indexTypes[3]
21-
}
2219

2320
const response = await client.search(adjustQuery(esQuery, 'attribute', config));
2421

0 commit comments

Comments
 (0)