Indexing
Warning |
---|
Provide some indexing details here, benefits for the client and possibilities |
There are two mechanisms of indexing:
Entire data reindexing - An entire set of data (products, categories and content pages) are pushed to Hawksearch index at one time.
Single item reindexing - A single item (product, category, content page) is pushed to Hawksearch index. It happens when item is updated.
All indexing operations are processed asynchronously
Entire data reindexing
Items are reindexed using temporary index in background. The current (production) index is still used for searching. The temporary index is swapped with production index only when it is ready.
Single item reindexing
A single item update is pushed into current production index.
Automatic indexing
Manual indexing
List of indexers:
hawksearch_products
- Reindex all productshawkserech_content_pages
- Reindex all content pageshawksearch_categories
- Reindex all categories
Reindexing CLI command:
Code Block |
---|
php <magento>/<path>/bin/magento indexer:reindex hawksearch_products |
Since all items are stored in the same Hawksearch index any indexer triggers the entire data set for reindexing, including products, content_pages and hierarchical data
Indexed Fields
The correct data indexing process requires some fields to be created in Hawksearch. Please refer to the Fields documentation for more information about Fields Management. It requires Default System Fields which are used to correctly identify documents in Hawksearch index as well as mandatory Products and Pages fields to be crated in Hawksearch Dashboard
Default system fields
The following system fields need to be created:
...
Field Name
...
Save As
...
Description
...
__uid
...
Text Value
...
This is the unique item identifier. For products entity_id
is used
...
__type
...
Text Value
...
page
...
category
...
Text Value
...
The field for Hierarchy
Make sure that each default attribute, product type_id
and all system fields have fields created in Hawksearch Workbench
__uid
field should be set as Primary Key
category
field should be set as Is Hierarchical Field?
Product indexing
Reindex command
Code Block |
---|
php <magento>/<path>/bin/magento indexer:reindex hawksearch_products |
Indexed attributes
It is possible to configure which product attributes will be pushed to Hawksearch index. The attributes configuration can be done on Product Settings tab through Stores > Configuration > HAWKSEARCH
.
Default indexed attributes
The following attributes are pushed to Hawksearch index regardless of what is set in configuration.
Make sure that fields are created in Hawksearch Workbench
...
Field Name
...
Save As
...
Description
...
name
...
Text Value
...
Product name
...
url
...
Text Value
...
Product URL
...
image_url
...
Text Value
...
Product Image URL
...
thumbnail_url
...
Text Value
...
Product Thumbnail URL
...
type_id
...
Text Value
...
Magento product type
...
Pricing Fields
...
price_regular
...
Numeric Value
...
Regular Product Price
...
price_final
...
Numeric Value
...
Discounted Product Price
...
price_regular_include_tax
...
Numeric Value
...
Regular Product Price Including tax
...
price_final_include_tax
...
Numeric Value
...
Discounted Product Price Including tax
...
price_regular_formatted
...
Text Value
...
Regular Product Price including currency sign
...
price_final_formatted
...
Text Value
...
Discounted Product Price including currency sign
...
price_regular_include_tax_formatted
...
Text Value
...
Regular Product Price including tax and currency sign
...
price_final_include_tax_formatted
...
Text Value
...
Discounted Product Price including tax and currency sign
...
price_group_<group_id>
Will be released in V2
...
Numeric Value
...
Discounted Product Price per Customer Group
...
price_group_<group_id>_include_tax
Will be released in V2
...
Numeric Value
...
Discounted Product Price per Customer Group Including tax
...
price_group_<group_id>_formatted
Will be released in V2
...
Text Value
...
Discounted Product Price per Customer Group including currency sign
...
price_group_<group_id>_include_tax_formatted
Will be released in V2
...
Text Value
...
Discounted Product Price per Customer Group including tax and currency sign
...
price_min
...
Numeric Value
...
Minimal price for configurable, bundle and grouped products
...
price_max
...
Numeric Value
...
Maximal price for configurable, bundle and grouped products
...
For example, if your store has the following groups (see image above) then these price attributes will be pushed to HawkSearch index:
price_group_0
price_group_0_include_tax
price_group_0_formatted
price_group_0_include_tax_formatted
price_group_1
price_group_1_include_tax
price_group_1_formatted
price_group_1_include_tax_formatted
price_group_2
price_group_2_include_tax
price_group_2_formatted
price_group_2_include_tax_formatted
price_group_3
price_group_3_include_tax
price_group_3_formatted
price_group_3_include_tax_formatted
Category indexing
Reindex command
Code Block |
---|
php <magento>/<path>/bin/magento indexer:reindex hawksearch_categories |
Content page indexing
Reindex command
Code Block |
---|
php <magento>/<path>/bin/magento indexer:reindex hawkserech_content_pages |
Indexed attributes
Make sure that fields are created in Hawksearch Workbench
...
Field Name
...
Save As
...
Description
...
title
...
Text Value
...
Page Title
...
content_heading
...
Text Value
...
Content Heading
...
content
...
Text Value
...
has been moved to GitHub