Indexing Scalars
Learn how Layers accurately indexes scalar data like dates, numbers, and booleans to enhance your e-commerce filtering and sorting capabilities.
Introduction to Scalar Indexing
Scalar data types, such as numbers, and booleans, are the cornerstone of filtering and sorting in search engines. They are particularly vital in e-commerce scenarios where users might want to sort items by price, find products within a date range, or filter by availability.
Automating Scalar Data Handling
Layers simplifies data management by automatically recognizing and indexing scalar values in their appropriate formats, ensuring that numerical and date-based sorting reflects users’ expectations.
Manually Specifying a Type
When using Named Tags you can include an additional colon (:
) delimited part after the key containing a type of number
or boolean
. Example tag value: monthly_sales:number:300.25
How Automatic Indexing Benefits You
- Numbers: Numeric values are indexed to support operations like range queries, enabling users to search within price ranges or ratings.
- Booleans: True or false values are indexed to facilitate filters like ‘in stock’ vs. ‘out of stock’.
Was this page helpful?