GROUP N by ORDER by

Switching to Manticore 3.4.2 с sphinx 3_2_1 и sphinx 2_1_1

The problem with the sorting

SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP 100
by collection WITHIN GROUP BY ORDER by price ASC
order by price ASC

Manticore 3.4.2:
collection | price
collection3 | 100
collection3 | 200
collection2 | 100
collection2 | 200
—collection0 | 50
—collection0 | 100
collection1 | 110
collection1 | 210

sphinx 3_2_1 и sphinx 2_1_1:
collection | price
collection0 | 50
collection0 | 100
collection3 | 100
collection3 | 200
collection2 | 100
collection2 | 200
collection1 | 110
collection1 | 210

Without GROUP N
SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP by collection WITHIN GROUP BY ORDER by price ASC

collection | price
collection0 | 50
collection3 | 100
collection2 | 100
collection1 | 110

What is the problem with Manticore?

could you try build from recent master head as there was fix at 0f3299d56007a600a45d694b5e0eefcd9d136f85 for string sorting with group by

I use the latest manticore-3.4.2-200410-6903305

the fix is in master branch and will be release later.
release 3.4.2 hasn’t this fix.

I’ll wait for the fix, I’m not strong enough to build from src. Thanks for the answer.

when it might be better to provide a complete example that I might to check to make sure exactly your issue is fixed.

You might create ticket at Github with config \ source data or insert stream and search query that I could try locally.

В общем Manticore для меня более интересен чем Sphinx, а главное более стабильный. На Github выложить не смогу, не умею. Пока тестирую дальше.

In General, Manticore is more interesting for me than Sphinx, and most importantly more stable. I can’t post it on Github, I can’t do it. While testing further.

вы можете залить ваши данные на write-only FTP:

ftp: dev.manticoresearch.com
user: manticorebugs
pass: shithappens

Я спрашиваю про данные только по тому что, может оказатся что фикс о котором я говорил - не исправляет вашу ситуацию и вы будете ждать релиз только для того чтобы зарепортить багфикс.

When to wait for a new Release with 0f3299d56007a600a45d694b5e0eefcd9d136f85

Hopefully in 10-14 days, but it depends on our pre-release testing which we are in the process of now. We are testing, finding bugs and crashes, fixing them, then testing again, each test takes few days of running a new version on tens of production servers to be sure the version is ready to be used in other production environments. It takes time.

But it’s not a problem to make a package for you if you want. We’ll be glad if you test it too and let us know if it’s stable for you or not.

Я готов протестировать , мне нужны пакеты на Windows и Centos 7, как получить тестовые пакеты?

@ALEKSss

Windows

Centos 7

В Centos 7 только файл sphinxudf.h сам архив 6 Кб

@ALEKSss да, прошу прощения, вот правильная ссылка - https://repo.manticoresearch.com/repository/manticoresearch/dev/centos/7/x86_64/manticore-3.4.3_200701.2e1484c-1.el7.centos.x86_64.rpm

ОК тестирую

По прежнему при запросе есть глюк WITHIN GROUP BY ORDER by :

SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP 100
by collection WITHIN GROUP BY ORDER by price ASC
order by price ASC

collection | price

collection4 | 40
collection3 | 100
collection3 | 200
collection2 | 100
collection2 | 200
—collection0 | 50
—collection0 | 100
collection1 | 110
collection1 | 210

если DESC, то все рано не верно выдача

SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP 100
by collection WITHIN GROUP BY ORDER by price DESC
order by price DESC

collection | price

collection1 | 210
collection1 | 110
—collection0 | 100
—collection0 | 50
collection3 | 200
collection3 | 100
collection2 | 200
collection2 | 100
collection4 | 40

но если WITHIN GROUP BY и ORDER by разнятся , то работает верно

SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP 100
by collection WITHIN GROUP BY ORDER by DESC
order by price ASC

collection | price

collection4 | 40
collection0 | 100
collection0 | 50
collection3 | 200
collection3 | 100
collection2 | 200
collection2 | 100
collection1 | 210
collection1 | 110

Хочется так, но не могу добиться:
SELECT collection,price FROM myindex WHERE id IN (1,23,22…334,5677) GROUP 100
by collection WITHIN GROUP BY ORDER by price ASC
order by price ASC

collection | price

collection4 | 40
collection0 | 50
collection0 | 100
collection3 | 100
collection3 | 200
collection2 | 100
collection2 | 200
collection1 | 110
collection1 | 210

ну значит нужно сделать как я предложил сразу - создать тикет на github где приложить пример данных и конфига индекса с запросом, который воспроизводит описываемый вами кейс на локальной машине

Делаю

Я надеюсь будет исправление этой ошибки, для меня это очень критично, дано бы уже перевел все сайты на manticoresearch. Уже жду этого пол года.