ELI5 why ngramstring helped with my problem while ngram didn't

Created on 16 December 2022, over 2 years ago
Updated 27 February 2023, over 2 years ago

Hi!

Please forgive my ignorance (never had much exposure to Solr until recently), but I'm struggling to understand what exactly the ngramstring field type does differently under the hood as opposed to the ngram type.

My specific use case is that we have a Commerce based site and users can search by SKU. The SKU field was of the type Fulltext. Given a SKU “9K 00 12" you could search for up to "9K 0" or "00 12" and find the product. But type in "9K 00" and you'd get no results.

Switched from Fulltext to Fulltext ngram and the behavior remained the same.

Switched from Fulltext ngram to Fulltext ngramstring and now I can type to my heart's content and matching results will just show up.

Could someone please explain where the difference lies or point me in the direction of some documentation that illustrates the difference? I found the main Solr documentation regarding Ngrams lacking in this specific case.

Best regards
Marc

💬 Support request
Status

Fixed

Version

4.2

Component

Documentation

Created by

🇩🇪Germany marcoliver Neuss, NRW, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024