Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow special characters for the facet range labels #1650

Open
prmaxim opened this issue Apr 4, 2024 · 0 comments
Open

Allow special characters for the facet range labels #1650

prmaxim opened this issue Apr 4, 2024 · 0 comments

Comments

@prmaxim
Copy link

prmaxim commented Apr 4, 2024

Description

For numeric fields, you can provide a list of ranges and corresponding labels on which documents should be faceted.

Label naming is currently pretty strictly alphanumeric. However, there are uses where more special characters are needed. For example, for facets like this:

PRICE
-----
$0 - $19 (5)
$20 - $59 (11)
$60+ (4)

Steps to reproduce

{
  "facet_by": "price($0 - $19:[0, 20], $20 - $59:[20, 60], $60+:[60, ])"
}

or

{
  "facet_by": "price(`$0 - $19`:[0, 20], `$20 - $59`:[20, 60], `$60+`:[60, ])"
}

resulting in an error:

Facet range value is not valid.

Metadata

Typesense Version: 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants