🔍 Magento_Search · engine innodb
search_query
Search query table
Neighbourhood (1-hop foreign-key graph — showing 2 of 3)
flowchart LR c["search_query"]:::center n0["store"] click n0 "/schema/table/store" n0 -- store_id --> c n1["catalogsearch_recommendations"] click n1 "/schema/table/catalogsearch_recommendations" c -- query_id --> n1 click c "/schema/table/search_query" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (3)
Columns (10)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| query_id PK | int unsigned | no | Query ID | |
| query_text | varchar(255) | yes | Query text | |
| num_results | int unsigned | no | 0 | Num results |
| popularity | int unsigned | no | 0 | Popularity |
| redirect | varchar(255) | yes | Redirect | |
| store_id | smallint unsigned | no | 0 | Store ID |
| display_in_terms | smallint | no | 1 | Display in terms |
| is_active | smallint | yes | 1 | Active status |
| is_processed | smallint | yes | 0 | Processed status |
| updated_at | timestamp | no | CURRENT_TIMESTAMP | Updated at |
Keys & indexes
Primary key: query_id
Unique
- SEARCH_QUERY_QUERY_TEXT_STORE_ID (query_text, store_id)
Indexes
- SEARCH_QUERY_QUERY_TEXT_STORE_ID_POPULARITY (query_text, store_id, popularity) btree
- SEARCH_QUERY_IS_PROCESSED (is_processed) btree
- SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY (store_id, num_results, popularity) btree
- SEARCH_QUERY_QUERY_TEXT_STORE_ID_NUM_RESULTS_POPULARITY (query_text, store_id, num_results, popularity) btree
- SEARCH_QUERY_STORE_ID_POPULARITY (store_id, popularity) btree
- SEARCH_QUERY_STORE_ID (store_id) btree
- SEARCH_QUERY_POPULARITY_QUERY_TEXT_STORE_ID_NUM_RESULTS (popularity, query_text, store_id, num_results) btree
References (1)
- store_id → store .store_id (on delete CASCADE)
Referenced by (2)
- catalogsearch_recommendations .query_id → .query_id (on delete CASCADE)
- catalogsearch_recommendations .relation_id → .query_id (on delete CASCADE)