Stemming

Stemming helps SearchStax Site Search and Managed Search find content that uses different forms of a word.

For example, run, runs, and running can share a common stem. When stemming is configured for the fields being searched, a query for running can also match content containing run or runs.

Stemming doesn't guarantee that every variation of a word will match. Results depend on how content is indexed, which fields are searched, and how those fields process text.

How Stemming Works

SearchStax uses Apache Solr to process search queries. Solr can reduce related words to a common stem when content is indexed and when a search query is processed.

Stemming depends on the analyzers configured for each field type. The analysis used when indexing content and processing queries must be compatible for stemming to produce the expected matches.

Not every field uses stemming:

  • Text fields can support tokenized, full-text search. Whether they use stemming depends on their analyzer configuration.
  • String fields don't tokenize text into individual words and are generally used for exact-value matching.

Stemming Configuration in Site Search

Site Search uses built-in stemming configurations that can vary by App platform. Whether stemming applies to a particular field depends on its field type and analyzer configuration.

If you use the Site Search Crawler, its field mappings determine where content is indexed. Search Fields determines which indexed fields are searched when someone submits a query.

These settings let you control which content is indexed and searched, but they don't change the underlying stemming algorithms.

Troubleshoot Stemming in Site Search

If searches for different forms of a word produce unexpected results, check your field configuration.

1. Check Your Search Fields

Go to Configurations > Basic Configurations > Search Fields.

Check whether the fields containing the content you want to search, such as titles or descriptions, are selected.

For word-variant matching, use appropriate tokenized Text fields with stemming support. Don't assume every Text field uses stemming.

See Search Fields and Choose Field Types for Site Search Features.

2. Review Your Indexed Field Mappings

If you use the Site Search Crawler, open its settings and expand Manage Fields for Search Index.

Check how your source content is mapped to indexed fields. If an existing field doesn't support stemming, you might need a separate Text field for that content.

See Crawler Field Map.

If you use another ingestion method, review its field mappings and indexing configuration.

3. Update Your Index and Search Configuration

If you changed your Crawler mappings, save the changes and crawl your content again.

After the updated content is indexed, return to Search Fields. If a new field doesn't appear, click Reload Schema to refresh the available fields.

Note: Reload Schema refreshes the available-field list. It doesn't crawl or reindex your content.

Select the appropriate Search Fields, click Save Draft, then Publish to make the configuration available in Preview.

4. Test Related Word Forms

In Preview, search for related forms such as run, runs, and running.

Check whether the expected documents appear. Result counts and rankings can differ even when stemming works. Identical result counts alone don't establish that stemming is working.

If expected matches are still missing, verify that the content was indexed into the intended fields. Contact SearchStax Support if you need help reviewing your field configuration.

Stemming Limitations and Synonyms

Stemming can handle common word endings, but it doesn't recognize every irregular word form.

For example, woman and women, person and people, or crisis and crises might not reduce to the same stem.

If important word variations don't match automatically, consider using Synonyms. A two-way synonym can help searches for either term find content containing the other.

Synonyms apply only to tokenized, full-text search fields. They don't affect non-tokenized String fields.

Test synonym changes and check for unexpected matches. Expanding too many terms can introduce irrelevant results.

Stemming in Managed Search

In Managed Search, stemming depends on the Solr schema and analyzer configuration for your collection.

Review the relevant field types and their index-time and query-time analyzers to determine which stemming filters apply. Managed Search configurations can differ from the Site Search defaults described above.

Articles in this section