|
@@ -47,9 +47,6 @@ import {
|
|
|
import { createIndices, getClient, getIndexNameByAlias } from './indexing-utils';
|
|
import { createIndices, getClient, getIndexNameByAlias } from './indexing-utils';
|
|
|
import { MutableRequestContext } from './mutable-request-context';
|
|
import { MutableRequestContext } from './mutable-request-context';
|
|
|
|
|
|
|
|
-const REINDEX_CHUNK_SIZE = 2500;
|
|
|
|
|
-const REINDEX_OPERATION_CHUNK_SIZE = 3000;
|
|
|
|
|
-
|
|
|
|
|
export const defaultProductRelations: Array<EntityRelationPaths<Product>> = [
|
|
export const defaultProductRelations: Array<EntityRelationPaths<Product>> = [
|
|
|
'featuredAsset',
|
|
'featuredAsset',
|
|
|
'facetValues',
|
|
'facetValues',
|
|
@@ -273,6 +270,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes
|
|
|
let operations: BulkVariantOperation[] = [];
|
|
let operations: BulkVariantOperation[] = [];
|
|
|
|
|
|
|
|
productIds = await this.connection
|
|
productIds = await this.connection
|
|
|
|
|
+ .rawConnection
|
|
|
.getRepository(Product)
|
|
.getRepository(Product)
|
|
|
.createQueryBuilder('product')
|
|
.createQueryBuilder('product')
|
|
|
.select('product.id')
|
|
.select('product.id')
|
|
@@ -679,6 +677,7 @@ export class ElasticsearchIndexerController implements OnModuleInit, OnModuleDes
|
|
|
): Promise<BulkVariantOperation[]> {
|
|
): Promise<BulkVariantOperation[]> {
|
|
|
const channels = await this.requestContextCache.get(ctx, 'elastic-index-all-channels', () =>
|
|
const channels = await this.requestContextCache.get(ctx, 'elastic-index-all-channels', () =>
|
|
|
this.connection
|
|
this.connection
|
|
|
|
|
+ .rawConnection
|
|
|
.getRepository(Channel)
|
|
.getRepository(Channel)
|
|
|
.createQueryBuilder('channel')
|
|
.createQueryBuilder('channel')
|
|
|
.select('channel.id')
|
|
.select('channel.id')
|