Search and filter indexing
WooCommerce Product Table uses a search index to make searching, filtering and sorting faster, especially on stores with lots of products.
When a product table uses the current frontend, WooCommerce Product Table does not need to run expensive WooCommerce queries every time a customer searches or filters the table. Instead, it keeps a separate index of the product data that is useful for product tables. The table can then look up matching products from the index and return results more quickly.
Indexed search only applies to the current frontend. If your site is still using legacy mode, then WooCommerce Product Table does not use the index.
The index is built in the background. Most store owners do not need to start it manually. You may notice an indexing message in the WordPress admin after installing or updating WooCommerce Product Table, or after a large product import.
My table says there are no products
This is the most common reason for an empty product table on the new frontend. If the table renders its column headings, filters and search box but then says no products were found, the index has probably not finished building yet.
The table is not broken and your products are not affected. Wait for the index to finish, then reload the page. If the table is still empty:
- Look for the indexing notice in the WordPress admin. It shows how many products have been indexed so far.
- If the notice says indexing appears stalled, or that no products are currently indexed, click Rebuild Index.
- Go to Tools → Site Health → Info and open the WooCommerce Product Table section to check the numbers (see below).
- Check that Action Scheduler is working on your site. The index is built through Action Scheduler, so if its queue is not running, the index cannot finish. Action Scheduler relies on WP-Cron, so a site with WP-Cron disabled needs a real server cron instead.
How the index works
WooCommerce Product Table creates its own database tables and fills them with searchable information from the products it is allowed to display.
The index is split into several parts:
- Search data stores searchable words from the product name, description, short description and SKU.
- Filter data stores the categories, tags, attributes, custom taxonomy terms and custom field values that your table filters need.
- Sort data stores normalized values for columns that are faster to sort from a prepared index.
- Status data records whether each product has been queued, indexed, skipped or failed.
Search words are normalized before storage. For example, HTML and shortcodes are stripped, words are lowercased, very short words are ignored, and accented words are stored in a way that helps searches match both accented and non-accented text. See search tokenization and language support for the detail.
The index is separate from your products. It does not replace or edit the original product data. If the index is rebuilt, WooCommerce Product Table clears and recreates the index records while leaving your products unchanged.
When the index is created or updated
The index is created automatically when WooCommerce Product Table prepares its database tables. This normally happens during plugin setup, update, or upgrade checks in the WordPress admin.
WooCommerce Product Table also keeps the index up to date after your catalog changes. It watches common events such as these:
- Saving or updating a product
- Changing a product status, including a product going out of stock
- Trashing or deleting a product
- Changing product categories, tags or attributes
- Changing product meta, including Advanced Custom Fields data where relevant
Small changes are queued shortly after the edit, rather than being processed immediately during the page load. This keeps the WordPress admin responsive while still keeping the index current. It also means a product you have only just saved may take up to a minute to appear in a table.
A large product import queues a lot of work at once, so allow time for the index to catch up afterwards.
Site Health checks
Go to Tools → Site Health → Info and open the WooCommerce Product Table section. It reports:
- Indexing running
- Action Scheduler available
- Products expected, Products indexed, Products pending and Products failed/skipped
- Index integrity
- Last indexing started and Last indexing completed
- Rebuild index, a link you can use to start a full rebuild
- Incomplete index rows CSV, an export you can send us if you report a problem
When products expected and products indexed match and nothing is pending, the index is complete. If products failed or skipped is high, or index integrity reports a warning, run a rebuild and then contact us with the CSV export if the numbers do not settle.
Rebuilding the index
A rebuild clears the index and indexes every product again. It is safe to run at any time, and it does not touch your products.
You might rebuild the index after a large import, after changing which products your tables are allowed to display, or if a table is showing stale results. On a large catalog a rebuild takes a while, and tables can show incomplete results until it finishes, so avoid rebuilding during your busiest hours.