Skip to content

Commit da5e286

Browse files
committed
Merge remote-tracking branch 'origin/ACP2E-4225' into PR_2025_10_16_muntianu
2 parents 601fa83 + c094cf5 commit da5e286

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

app/code/Magento/Search/etc/db_schema.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
<index referenceId="SEARCH_QUERY_STORE_ID" indexType="btree" disabled="true">
6262
<column name="store_id"/>
6363
</index>
64+
<index referenceId="SEARCH_QUERY_POPULARITY_QUERY_TEXT_STORE_ID_NUM_RESULTS" indexType="btree">
65+
<column name="popularity"/>
66+
<column name="query_text"/>
67+
<column name="store_id"/>
68+
<column name="num_results"/>
69+
</index>
6470
</table>
6571
<table name="search_synonyms" resource="default" engine="innodb" comment="table storing various synonyms groups">
6672
<column xsi:type="bigint" name="group_id" unsigned="true" nullable="false" identity="true"

app/code/Magento/Search/etc/db_schema_whitelist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"SEARCH_QUERY_QUERY_TEXT_STORE_ID_POPULARITY": false,
2121
"SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY": true,
2222
"SEARCH_QUERY_STORE_ID": false,
23-
"SEARCH_QUERY_STORE_ID_POPULARITY": false
23+
"SEARCH_QUERY_STORE_ID_POPULARITY": false,
24+
"SEARCH_QUERY_POPULARITY_QUERY_TEXT_STORE_ID_NUM_RESULTS": true
2425
},
2526
"constraint": {
2627
"PRIMARY": true,

dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/Query/CollectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ public function testSearchQueryTableHasProperIndex(): void
3535
$table = $this->queryResource->getTable('search_query');
3636
$indexQueryStoreNumPopularity = 'SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY';
3737
$indexQueryTextStoreNumPopularity = 'SEARCH_QUERY_QUERY_TEXT_STORE_ID_NUM_RESULTS_POPULARITY';
38+
$indexPopularityQueryTextStoreNum = 'SEARCH_QUERY_POPULARITY_QUERY_TEXT_STORE_ID_NUM_RESULTS';
3839
$connection = $this->queryResource->getConnection();
3940
$tableIndexes = $connection->getIndexList($table);
4041
$this->assertArrayHasKey($indexQueryStoreNumPopularity, $tableIndexes);
4142
$this->assertArrayHasKey($indexQueryTextStoreNumPopularity, $tableIndexes);
43+
$this->assertArrayHasKey($indexPopularityQueryTextStoreNum, $tableIndexes);
4244
}
4345
}

0 commit comments

Comments
 (0)