Table of contents :

Stop Words, Plurals and Natural Language

100-days-of-algolia-034

Table of contents :

WooCommerce shoppers rarely search in the same structured language used by a product catalog. They may enter waterproof hiking boots, boot for hiking, or hiking boot and expect substantially the same products. Algolia can account for some of these variations through stop-word removal and plural handling, but the settings must be configured with the catalog language and business vocabulary in mind.

Stop words are useful query noise, not universal noise

Stop words are common words that often add little value to a product search. In an English query, words such as the, a, an, and for may not distinguish one product from another. Algolia’s removeStopWords setting allows the engine to ignore language-specific stop words during search.

For example, removing for can make shoes for trail running behave more like shoes trail running. That can improve recall when product names omit grammatical words that customers naturally include in a query.

Stop-word removal does not remove words from the indexed product data, and it does not change facet values, filter attributes, or the text displayed in results. It affects how the query is interpreted for matching.

Configure stop words for the catalog language

Set the option at the index level rather than trying to strip words in WooCommerce or in the browser. A basic English configuration can be applied with the Algolia client:

await index.setSettings({
  removeStopWords: ['en']
});

The exact language configuration should reflect the content customers search, not only the store’s administrative language. A multilingual store may require multiple language codes or separate indices, depending on how language-specific content is indexed and queried.

Do not maintain a large custom stop-word list without testing it. A word that is grammatically unimportant in one context may be commercially meaningful in another. For example, pro, one, or plus may identify a product model, package size, or range name. Review search analytics and zero-result searches before adding custom behavior.

Plural handling improves ordinary product searches

Customers often switch between singular and plural forms: shoe and shoes, dress and dresses, or headphone and headphones. Algolia’s ignorePlurals setting lets the engine treat supported singular and plural forms as equivalent for a configured language.

await index.setSettings({
  ignorePlurals: ['en']
});

This is particularly useful when WooCommerce product titles use a category convention such as Running Shoes, while customers search for running shoe. It reduces the need to create a synonym for every regular plural pair.

Plural handling is not a replacement for product-specific synonyms. Irregular forms, abbreviations, model names, and merchandising terminology still need deliberate treatment. For example, men’s and mens may require normalization or a synonym strategy, while children’s and kids are related business terms rather than simple plural variants.

Use language settings consistently

Stop-word and plural behavior is language-dependent. Configure the relevant language rather than assuming that an English setting will correctly process French, German, Spanish, or mixed-language catalog content. Language detection is not a substitute for an intentional indexing strategy.

For a multilingual WooCommerce implementation, agencies commonly choose one of three approaches:

  • Separate indices: Index each language into its own index and apply language-specific settings.
  • Locale-aware replicas: Use replicas when the same catalog needs language-specific ranking or merchandising variations.
  • One multilingual index: Keep multiple language fields in one record and carefully control searchable attributes and query behavior.

The right approach depends on translation quality, inventory synchronization, ranking requirements, and whether filters and merchandising rules must vary by market.

Natural-language queries need a relevance strategy

Natural-language search does not mean Algolia understands every sentence as a product requirement. A query such as black waterproof jacket under 150 contains several different kinds of intent:

  • Attributes: black and waterproof.
  • Product type: jacket.
  • Price constraint: under 150.

Use structured filters for values that should be exact, such as price, stock status, brand, size, or category. Keep the textual query focused on searchable product language. In a WooCommerce integration, the request might separate the free-text query from numeric and boolean filters:

const results = await index.search('black waterproof jacket', {
  filters: 'stock_status:true AND price <= 150',
  facets: ['brand', 'size', 'color']
});

This is more reliable than expecting stop-word removal or natural-language matching to interpret every part of a sentence as a business rule. It also keeps facet counts and filter behavior predictable.

Do not remove meaningful words from SKUs

Product search often combines natural-language discovery with exact identifiers. A shopper searching for model x100, series 5, or pack of 6 may be using words that appear insignificant in ordinary prose but are essential to the purchase.

Protect identifier searches by indexing SKUs and model numbers in dedicated attributes, giving those attributes suitable search priority, and testing exact-match behavior. Review the effects of removeStopWords, ignorePlurals, typo tolerance, and synonyms together. A setting that improves broad category searches can be harmful when a customer is looking for a precise replacement part.

Validate changes with WooCommerce search data

Before changing production settings, create a representative query set containing:

  1. Singular and plural pairs, such as shoe and shoes.
  2. Queries containing articles and prepositions, such as jacket for rain.
  3. Brand names, model numbers, and SKUs.
  4. Queries with sizes, colors, and price-related language.
  5. Queries from each supported catalog language.
  6. Known zero-result and low-conversion searches from the WooCommerce storefront.

Compare hit count, top-result relevance, facet behavior, conversion rate, and add-to-cart rate. Inspect query logs after deployment rather than judging the change only from a few manual searches. If a setting improves recall but pushes exact products down the ranking, adjust searchable attributes, custom ranking, or query rules instead of adding increasingly broad stop-word exceptions.

Practical implementation checklist

  • Set removeStopWords only for languages represented in the index.
  • Set ignorePlurals for supported catalog languages where singular and plural queries should match.
  • Keep price, stock, category, and other strict conditions in filters.
  • Keep SKUs, model numbers, and product codes testable as exact or near-exact searches.
  • Use synonyms for business language that is not a grammatical variant.
  • Test settings against real WooCommerce queries before applying them to every storefront index.
  • Monitor zero-result searches and changes in conversion after release.
Trending posts
You might also like