WooCommerce
Opensolr Search auto-detects WooCommerce when it is active on your site. Products are indexed alongside your regular content with full structured product data — no additional configuration needed.
What gets indexed
When WooCommerce is active, each product is indexed with the following fields:
- Product name — stored in the
titlefield - Short description — stored in the
descriptionfield - Long description — stored in the
textandtext_tfields - Price — stored as
price_f(float field, enables the price slider facet) - Currency — stored as
currency_s(e.g., USD, EUR, GBP) - Product categories — stored as
product_category_sm(multi-valued, all assigned categories) andproduct_category_s(breadcrumb string with>separator) - SKU — the product SKU, searchable and facetable
- Gallery images — product gallery image URLs
- OG image — the product's featured image, shown as a thumbnail in search results
Variation attributes
For variable products, all variation attributes (size, color, material, etc.) are included in the searchable text. This means a visitor searching for "red large t-shirt" will find the product even if those terms only appear in the variations, not the main product description.
Category hierarchy
WooCommerce product categories are automatically indexed as a hierarchical taxonomy using the item_list_element_N_name_sm field naming convention:
item_list_element_1_name_sm— top-level category (e.g., "Clothing")item_list_element_2_name_sm— second-level category (e.g., "T-Shirts")- And so on for deeper levels
This enables the hierarchical drill-down facet in the sidebar. Visitors can navigate Products › Clothing › T-Shirts with a back button and breadcrumb trail at each level. See Facets & Filters for details on the hierarchical widget.
Price slider
When the price_f field exists in your index (automatic with WooCommerce products), you can enable a price slider facet in the Facet Mapping tab. The slider uses noUiSlider with:
- Min/max range automatically calculated from your product prices
- Text input boxes for typing exact values
- Thousands separators for readability (e.g., $1,299.99)
- Apply and Clear buttons
Currency formatting
Prices on search results display with the correct currency symbol. The plugin maps WooCommerce currency codes to symbols automatically:
USD → $
EUR → €
GBP → £
JPY → ¥
CHF → CHF
+ more
The currency stored in currency_s is used to look up the correct symbol for display on each result.
Real-time sync
Product changes are synced to your search index in real time:
Product saved
When you save or update a product, it is immediately sent to the Solr index. Changes appear in search results within seconds.
Product deleted
When you trash or delete a product, it is immediately removed from the Solr index. No stale results.
Real-time sync uses the save_post and delete_post WordPress hooks with a 5-second API timeout to avoid blocking the admin interface.
Quality score
Each indexed product receives a quality_f score that factors into search ranking (when Quality Boost is enabled). The score considers:
- Title length — descriptive product names score higher
- Description length — products with detailed short descriptions are rewarded
- Body length — the full long description text
- OG image presence — products with a featured image get a bonus
This ensures well-maintained product pages rank higher than stub entries or products with minimal content.
Bulk ingestion
To index all existing WooCommerce products at once, use the "Ingest All Now" button on the Data Ingestion tab. The plugin automatically detects WooCommerce products and includes them alongside posts and pages. A live progress bar shows batch count, percentage, and any errors.
For the most complete indexing, use both the Web Crawler and Data Ingestion together. The crawler extracts structured data from your rendered product pages (JSON-LD, BreadcrumbList, price meta tags), while ingestion sends the raw WordPress/WooCommerce data directly. Both sources are deduplicated automatically — you always get a single, rich document per product.
If WooCommerce is not active on your site, product-specific fields are simply not generated. The plugin works identically for posts, pages, and custom post types. You can install WooCommerce later and existing search functionality is unaffected.