@infrab4a/connect-angular 5.2.2-beta.5 → 5.2.2-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1511,6 +1511,7 @@ class CategorySearchStrategy {
1511
1511
  fields,
1512
1512
  });
1513
1513
  }
1514
+ console.warn('default search', category);
1514
1515
  return this.searchDefault({
1515
1516
  category,
1516
1517
  filters,
@@ -1523,6 +1524,7 @@ class CategorySearchStrategy {
1523
1524
  });
1524
1525
  }
1525
1526
  async searchWithMostRelevant(params) {
1527
+ console.warn('searchWithMostRelevant', params);
1526
1528
  const { category, filters, shop, optionsCache } = params;
1527
1529
  const mostRelevant = category.isWishlist ? [] : category.getMostRelevantByShop(shop);
1528
1530
  const productsIds = await this.getProductIds(category, filters, optionsCache);
@@ -1567,6 +1569,10 @@ class CategorySearchStrategy {
1567
1569
  async getProductIds(category, filters, optionsCache) {
1568
1570
  const productCatalog = this.repositoryService.getProductCatalog();
1569
1571
  const filterHelper = this.helpersService.getFilterHelper();
1572
+ console.warn('getProductIds filters', {
1573
+ ...(await productCatalog.categoryStructureAdapter.buildProductFilterByCategory(category)),
1574
+ ...filterHelper.buildFilterQuery(filters || {}),
1575
+ });
1570
1576
  return productCatalog.productRepository
1571
1577
  .findCatalog({
1572
1578
  fields: ['id'],
@@ -1583,6 +1589,10 @@ class CategorySearchStrategy {
1583
1589
  const filterHelper = this.helpersService.getFilterHelper();
1584
1590
  const sortHelper = this.helpersService.getSortHelper();
1585
1591
  const mostRelevantProductsIds = [...new Set(mostRelevants.concat(productIds))];
1592
+ console.warn('findAndSortByMostRelevant', {
1593
+ id: { operator: Where.IN, value: mostRelevantProductsIds },
1594
+ ...filterHelper.buildFilterQuery(filters || {}),
1595
+ });
1586
1596
  const totalResult = await productCatalog.productRepository.findCatalog({
1587
1597
  fields,
1588
1598
  filters: {