How to configure search indexes
To configure search indexes, navigate to System -> Search management -> Search indexes and click the Add new index button.
Product index
-
In the General information section:
- Set Title (e.g. Products)
- Choose Magento -> Product in the Type field.
- Set Position (e.g. 1)
-
In the Searchable attributes section, click the Add attribute button to add the product attributes that should be searchable, and set the Weight for each attribute.
Product searchable attributes -
In the Additional section, configure how the extension should sort search results for the product index. By default, it is recommended to set Sort by as
Relevance
.Before proceeding, click the Save and Continue Edit button to save your changes and load Properties section.
-
In the Properties tab, enable additional options to customize the search according to your needs:
- Search by parent categories name
- Search by child products
- Search by Product ID
- Search by custom options
- Exclude out of stock products
-
Click on Save button to save your configuration.
noteTo implement changes you should reindex your product index. You can run reindex in the Search indexes page, for this choose Reindex in the Action column. Or run reindex for Search index via default Magento Index Management section.
Category index
-
In the General information section:
- Set Title (e.g. Categories)
- Choose Magento -> Category in the Type field.
- Set Position (e.g. 2)
-
In the Searchable attributes section, click the Add attribute button to add the category attributes that should be searchable, and set the Weight for each attribute.
-
In the Additional section, configure how the extension should sort search results for the category index. By default, it is recommended to set Sort by as
Relevance
.Before proceeding, click the Save and Continue Edit button to save your changes and load Properties section.
-
In the Properties section, enable additional options to customize the search according to your needs:
- Ignored categories
- Include empty categories
-
Click on Save button to save your configuration.
noteTo implement changes you should reindex your product index. You can run reindex in the Search indexes page, for this choose Reindex in the Action column. Or run reindex for Search index via default Magento Index Management section.
CMS page index
-
In the General information section:
- Set Title (e.g. Information)
- Choose Magento -> CMS Page in the Type field.
- Set Position (e.g. 3)
-
In the Searchable attributes section, click the Add attribute button to add the CMS page attributes that should be searchable, and set the Weight for each attribute.
-
In the Additional section, configure how the extension should sort search results for the CMS page index. By default, it is recommended to set Sort by as
Relevance
.Before proceeding, click the Save and Continue Edit button to save your changes and load Properties section.
-
In the Properties section, enable additional options to customize the search according to your needs:
- Ignored CMS pages
-
Click on Save button to save your configuration.
noteTo implement changes you should reindex your product index. You can run reindex in the Search indexes page, for this choose Reindex in the Action column. Or run reindex for Search index via default Magento Index Management section.
Attribute index
Unlike other indexes, this one can only be created for a specific attribute that should be displayed as a separate section in the search results.
-
Before creating the attribute index, ensure that the specific attribute is searchable and that the Use in Search and Visible in Advanced Search options are enabled.
warningAttribute indexes can only work with attributes that are indexable (i.e., they belong to a selectable type).
To determine the type of a Product Attribute, go to the Stores -> Attributes -> Product grid, select the attribute record, and check the Catalog Input Type for Store Owner field. Selectable types are Multiple Select and Dropdown. Only attributes of these types can be indexed.
If you wish to use attributes such as
Author
or similar, you must first make them selectable, and then follow the steps above to make them available for search. -
In the General information section:
- Set Title (e.g. Custom attribute)
- Choose Magento -> Attribute index in the Type field.
- Set Position (e.g. 4)
-
In the Searchable attributes section, click the Add attribute button to add the attribute value options that should be searchable, and set the Weight for each of them.
-
In the Additional section, configure how the extension should sort search results for the attribute index. By default, it is recommended to set Sort by as
Relevance
.Before proceeding, click the Save and Continue Edit button to save your changes and load Attributes section.
-
In the Attributes section, in the Attribute field add your custom attributes to customize the search according to your needs.
warningOnly attributes with Visible in Advanced Search - Yes can be used for attribute index.
-
Click on Save button to save your configuration.
noteTo implement changes you should reindex your product index. You can run reindex in the Search indexes page, for this choose Reindex in the Action column. Or run reindex for Search index via default Magento Index Management section.
External index (Wordpress Blog)
-
In the General information section:
- Set Title (e.g. Wordpress Blog)
- Choose External -> Wordpress Blog in the Type field.
- Set Position (e.g. 5)
-
In the Searchable attributes section, click the Add attribute button to add the attributes that should be searchable, and set the Weight for each attribute.
-
In the Additional section, configure how the extension should sort search results for the index. By default, it is recommended to set Sort by as
Relevance
.Before proceeding, click the Save and Continue Edit button to save your changes and load Properties section.
-
In the Database connection section add:
-
Database connection name:
-
If WordPress is installed on the same database, the correct value is
default
.exampleA typical database connection should look similar to this:
'db' => array(
'table_prefix' => '',
'connection' => array(
'default' => array(
'host' => 'localhost',
'dbname' => 'store',
'username' => 'root',
'password' => 'password',
'active' => '1',
),
),
), -
If WordPress is installed on a separate database, you need to create a new connection in the file
app/etc/env.php
.exampleA typical database connection should look similar to this:
'db' => array(
'table_prefix' => '',
'connection' => array(
'default' => array(
'host' => 'localhost',
'dbname' => 'store',
'username' => 'root',
'password' => 'password',
'active' => '1',
),
),
),
-
-
- Table prefix
-
In the Url Template section add the full URL for your posts with dynamical variables.:
-
URL template
exampleTypical base urls should look like the example below:
http://example.com/blog/{post_name}.html
http://example.com/blog/?p={ID}
http://example.com/{category_slug}/{post_name}.html
-
-
Click on Save button to save your configuration.
noteTo implement changes you should reindex your product index. You can run reindex in the Search indexes page, for this choose Reindex in the Action column. Or run reindex for Search index via default Magento Index Management section.
Integration and 3rd-party module index
In addition to the indexes mentioned above, the extension allows creating indexes for certain Mirasvit and third-party modules. These indexes will be available if the corresponding integration modules are installed on your site.