Skip to content

Facet search by float RANGE() not working #3401

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

Open
4 tasks
tjslash opened this issue May 22, 2025 · 0 comments
Open
4 tasks

Facet search by float RANGE() not working #3401

tjslash opened this issue May 22, 2025 · 0 comments
Assignees
Labels

Comments

@tjslash
Copy link

tjslash commented May 22, 2025

Bug Description:

DROP TABLE IF EXISTS test_interval_and_range;
CREATE TABLE test_interval_and_range(volume float);
DESC test_interval_and_range;
+--------+--------+------------+
| Field  | Type   | Properties |
+--------+--------+------------+
| id     | bigint |            |
| volume | float  |            |
+--------+--------+------------+
INSERT INTO test_interval_and_range(volume) VALUES (0.1),(0.1),(0.3),(0.5),(0.6),(0.6),(0.2);
SELECT * FROM test_interval_and_range;
+---------------------+----------+
| id                  | volume   |
+---------------------+----------+
| 8289829777360027656 | 0.100000 |
| 8289829777360027657 | 0.100000 |
| 8289829777360027658 | 0.300000 |
| 8289829777360027659 | 0.500000 |
| 8289829777360027660 | 0.600000 |
| 8289829777360027661 | 0.600000 |
| 8289829777360027662 | 0.200000 |
+---------------------+----------+
SELECT * FROM test_interval_and_range FACET INTERVAL(volume, 0.1,0.3,0.5,1) AS volume_interval;

It's work:

+-----------------+----------+
| volume_interval | count(*) |
+-----------------+----------+
|               1 |        3 |
|               2 |        1 |
|               3 |        3 |
+-----------------+----------+
SELECT * FROM test_interval_and_range FACET RANGE(volume, {range_to=0.1},{range_from=0.1,range_to=0.3},{range_from=0.3,range_to=0.5},{range_from=0.5,range_to=1}) AS volume_range;

But, it's not working:
ERROR 1064 (42000): P01: syntax error, unexpected float near '0.1},{range_from=0.1,range_to=0.3},{range_from=0.3,range_to=0.5},{range_from=0.5,range_to=1}) AS volume_range'

Manticore 7.4.6 b2ff82920@25022808 (columnar 4.1.1 25f4706@25022806) (secondary 4.1.1 25f4706@25022806) (knn 4.1.1 25f4706@25022806)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2024, Manticore Software LTD (https://manticoresearch.com)

Manticore Search Version:

7.4.6

Operating System Version:

Ubuntu

Have you tried the latest development version?

None

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants