How product search works
ShopWired’s product search system utilises the Elastic.co search engine to provide product search results to your website’s visitors.
Elastic.co is a tool for providing search results, and ShopWired has implemented its own directions into the system to determine what products are displayed in search results for search keywords according to a number of rules.
Therefore, ShopWired balances the needs of all users:
- To favour returning more products in results rather than fewer
- To favour search keywords that match or partially match with product codes
Product data used in ShopWired's product search system
Product data used in ShopWired's product search system
For each product, ShopWired sends the following information to Elastic.co:
- Product name/title
- The name(s) of the categories it belongs to
- The name(s) of the brand it belongs to
- The names of any filters applied to the product
- Any custom search keywords applied to the product
This data is indexed into ShopWired’s search system in a single keywords field and analysed by Elastic.co, which the contents of this field.
Elastic.co also applies a system called the that reduces words to their root form (for example, a keyword of running
is reduced to run
).
Identifiers
Identifiers
ShopWired also sends the following identifiers to Elastic.co for each product:
- SKU code (including SKU codes for variations)
- MPN (including MPN codes for variations)
- GTIN (including GTIN codes for variations)
Each identifier is analysed and split into with a length of 3 characters each.
Using ngrams means we also look for close matches in search results. For example, a product with a SKU code of LRJ923
will be matched with a search for LRJ924
.
The extracted ngrams are indexed into ShopWired’s search system and placed in a single identifiers field.
Both sets of data result in a complete list of applicable keywords for a product.
How are search keywords used on my website matched with products?
How are search keywords used on my website matched with products?
When a visitor enters search keywords into your website, they are matched with both the keywords and identifiers fields stored and indexed for each product.
Search keywords entered need to be at least 3 characters long to be used to match with a search term, e.g. a search query of AB
or YZ
will be ignored and not used for matching.
ShopWired requires that when multiple keywords are used in a search query, each keyword must be a match for a product’s indexed keywords. However, only a single keyword used in search needs to match with an indexed identifier for a product.
Matching products are then analysed for relevance, and a relevancy score is computed by Elastic.co. Relevancy matching and scoring are complex topics, and more information is available about these topics here and here.
Elastic.co returns the matching products to ShopWired in relevancy order, and ShopWired returns these results as provided on the search page of your website.
Importantly, product/variation codes (SKU, MPN, GTIN) are given a boost by ShopWired, and matches between a search query and search term that are for product/variation codes are ranked higher in search results than matches for other types of data (such as product names or brand names).
In addition, SKU code matches are additionally boosted so that if one search keyword is matched with a SKU code, no other keywords in the visitor's search need to match with the product in order for it to be returned in search results.
The impact of SKU/GTIN/MPN code matches in search results
The impact of SKU/GTIN/MPN code matches in search results
ShopWired splits SKUs, MPNs, and GTINs into ngrams with a length of 3 characters. These ngrams are stored in an identifiers field for the product.
When a visitor searches on your website, their search keywords are analysed, and ShopWired attempts to match them with one of the ngram identifiers stored.
Matches of search keywords with SKU, MPN, or GTIN identifiers only need to be 3 characters long, and matches are boosted for relevancy, so they appear higher up in search results.
For example:
- Visitor searches for
bed sheets
on a website - The light_english stemmer is applied to the search keywords, resulting in separate keywords of
bed
andsheet
- The search keywords are matched against the keywords field indexed for each product; both keywords need to match for the product to be considered relevant (for example, a product with a product title of
Linen Bed Sheets
will be considered relevant) - The visitor’s search is also split into ngrams of 3 characters, resulting in
bed
,she
,hee
,eet
,ets
- Each ngram in the search is matched against the identifiers field indexed for each product; only a single ngram needs to match for the product to be considered relevant
- For example, a product with a SKU code of
EET923829
will be considered relevant
- Products with identifier matches are boosted in their relevancy score above products with keyword matches
Boosting and demoting products in search
Boosting and demoting products in search
ShopWired provides the product search keywords app to enable users to add keywords to products in a Search keywords setting. This setting can be used to ensure products are returned in search results for keywords that don't currently match the product.
ShopWired does not provide a similar app to stop products being returned for specific search keywords.
It is not currently possible to either boost a product in search results, ensuring it appears above other products, or demote a product, ensuring it appears beneath other products.