Menu

1 / 2

How to Make xt850 Match xt 850

DEV Community·Sergey Nikolaev·6 months ago
#Gfz7i4S5
Reading 0:00
15s threshold

TL;DR

Since version 23.0.0 , Manticore can make searches like xt850 match xt 850 using bigram_delimiter together with digit-aware bigram_index modes.

This solves a common tokenization mismatch in product search, where users remove spaces from model names but the source data stores them as separate tokens.

Assumptions and verification

This article assumes:

RT tables created with SQL examples exactly as shown

default tokenization unless the example explicitly changes a setting

ASCII digits in model names, because second_numeric and second_has_digit are digit-aware modes built around 0-9

All SQL examples and expected outputs in this article were verified against a real Manticore 23.0.0 instance before publishing, using fresh tables created from scratch for each scenario.

The broader search problem

Imagine a catalog containing:

xt 850 action camera

iphone 5se battery case

canon eos 80d body

thinkpad x1 carbon

Now imagine users searching for:

xt850

iphone5se

eos80d

thinkpadx1

From the user's…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.