- How does Ecwid search products?
- How can I make search more specific?
- How how to filter products?
- Why search results in my control panel differ from ones in the storefront?
- Why the newly added products are not immediately available in the search results?
Ecwid has a powerful built-in search engine that provides quick and relevant search among a huge amount of products. It uses a special stand-alone search server (Solr) that constantly indexes all Ecwid stores and always keeps the product information accurate and up to date. So when you add a new product to your store, it immediately becomes available for search in all of your storefronts. Ecwid searches products over multiple fields:
- product name
- product description
- product SKU
- product options
- category name
Even so, Ecwid provides a customer with the most relevant search results and it does it quickly. It makes Ecwid different from a lot of other shopping carts.
In most cases, search by a word or by a phrase is quite enough to find a desired product in the catalog - that's how people usually search something in the web. Ecwid search tool enables an user to define several search filters that can make search more specific or more wide though:
In the storefront, Ecwid searches products by individual words in search phrase. When you want to search for an exact phrase, you should enclose the entire phrase in quotation marks. This tells Ecwid to search for the precise terms in the prescribed order.
For example, if you’re searching for iPod Shuffle in our demo store, you could enter 'ipod shuffle' as your query, and you will get acceptable results, moreover, the iPod Shuffle will be on the top of the search results as it is the most relevant in this case. But the results will also list any other products that contain the words 'ipod' or 'shuffle' anywhere in their description or name. In order to limit the results just to the products related to iPod Shuffle, you should enter the query "ipod shuffle" - making sure to surround the phrase with quotation marks.
Ecwid supports searches such as 'book*', where wildcard means 0 or more characters. The query 'book*' will find products containing terms such as book, bookstore, booklet, etc.
If your search query contains two or more words and you want to find products that have all of those words mentioned in their info, you can join those words by 'AND'. Examples:
- ipod AND shuffle
- ipod AND headphones AND sennheiser
If you want to find products that have either of the query's terms mentioned in their info, you should join your words with 'OR'. Examples:
- shuffle OR nano
- shuffle OR nano OR touch
Note: This actually works in the same way as by default - when no filter is used, all words in a search query are considered as joined by 'OR'.
If you want to exclude products, that contain some word, from search results, you should place 'NOT' before that word in a search query. Examples:
- ipod NOT shuffle
- ipod NOT shuffle NOT nano
Note: you can combine together the abovementioned tricks to get more efficient searches. Examples:
- "ipod shuffle" AND charger (will find products where the phrase 'ipod shuffle' and the word 'charger' are mentioned → will find a charger for iPod Shuffle)
- ipod NOT ear* (will find products where the word 'ipod' is mentioned but words like 'ear', 'in-ear', 'earphones' are not → will find all iPod-related products but exclude any earphones from the search results).
Ecwid provides several approaches on broadening the search functionality.
You can use one of the Ecwid apps for adding advanced search to your store. Please refer to this page for details: How to add advanced search/filters to your store
Alternatively you can use our Product Filters API to tune up the search in your store according to your needs. Please refer to this article for details: Product Filters API
The 'Search products' tool in Ecwid control panel works in a similar way to the search widget in the storefront. However, when using them, you may get different search results due to the following reasons:
- If you have disabled products in your store, they will never be listed in the storefront, but you certainly can get them in the back-end search.
- If the option 'Hide out of stock products' is enabled in your control panel (Settings → General → Cart → Catalog settings), then the out of stock products won't appear in the storefront.
- The 'Search products' tool in the control panel looks for a product by an exact phrase. On the other hand, the storefront's search widget keeps in account each given word separately. We are basing such a logic on a reasonable presumption that a store admin knows his products and categories better then a customer, so the latter should be given an opportunity to find a product without using precise search phrases. Additionally, when an admin uses the search tool, he is looking for some particular product, and he most probably knows what words or phrases that product includes. On the other hand, a customer generally uses the search for getting info of whether some products exist in the store and maybe for comparing the prices. He is interested in getting a larger set of search results, so this is what Ecwid does for him.
Since Ecwid uses the special stand-alone search server, that server needs to index the data of the newly added products to be able to search on that data and provide links to those products in the search results. All the changes in the products data from all Ecwid stores are indexed in one queue. Hence, there is some delay between the moment when you add new products or make changes to the existing ones and the moment when you can see those changes reflected in the search results.
The process of indexing is fully automated - as soon as you save the changes to your products or complete the import, all those changes are queued for indexing, and as soon as the search server processes the queue up to your fresh changes, it will index the new data and make it available in the search.
So, if you just imported many products or made other massive changes to your inventory and expect it to appear in the results of the product search in your store - just wait for a few minutes. After some time your changes to the products will be automatically indexed and become available in search.
If, however, you find that your changes to the products are not reflected in the product search for a long time (hours to days) please let us know on the forum - our engineers will look into the issue.