Server crash on simple match query: match string max size

I have a simple query like:

SELECT *, SNIPPET(leaflet_pil_preview_name, ‘ASTRAGALUS PROPINQUUS ROOT UNII: 922OP8YUPF ASTRAGALUS PROPINQUUS ROOT UNII:922OP8YUPF BAPTISIA TINCTORIA UNII: 5K1UO2888Y BAPTISIA TINCTORIA UNII:5K1UO2888Y ECHINACEA ANGUSTIFOLIA UNII: VB06AV5US8 ECHINACEA ANGUSTIFOLIA UNII:VB06AV5US8 PHYTOLACCA AMERICANA ROOT UNII: 11E6VI8VEG PHYTOLACCA AMERICANA ROOT UNII:11E6VI8VEG GOLDENSEAL UNII: ZW3Z11D0JV GOLDENSEAL UNII:ZW3Z11D0JV APIS MELLIFERA UNII: 7S82P3R43Z APIS MELLIFERA UNII:7S82P3R43Z ARANEUS DIADEMATUS UNII: 6T6C’, ‘load_files=1, html_strip_mode=index, around=10’) AS snippet FROM myHB_index1 WHERE MATCH (‘ASTRAGALUS PROPINQUUS ROOT UNII: 922OP8YUPF ASTRAGALUS PROPINQUUS ROOT UNII:922OP8YUPF BAPTISIA TINCTORIA UNII: 5K1UO2888Y
BAPTISIA TINCTORIA UNII:5K1UO2888Y ECHINACEA ANGUSTIFOLIA UNII: VB06AV5US8
ECHINACEA ANGUSTIFOLIA UNII:VB06AV5US8 PHYTOLACCA AMERICANA ROOT UNII: 11E6VI8VEG PHYTOLACCA AMERICANA ROOT UNII:11E6VI8VEG GOLDENSEAL UNII: ZW3Z11D0JV GOLDENSEAL UNII:ZW3Z11D0JV APIS MELLIFERA UNII: 7S82P3R43Z APIS MELLIFERA UNII:7S82P3R43Z ARANEUS DIADEMATUS UNII: 6T6C’) AND (language_code IN (8, 27, 43)) GROUP BY med_id LIMIT 0,100 OPTION max_matches=100, ranker=sph04, field_weights=(name=10, active_ingredient=5);

which crashes the server, reducing the match string size to something like 256 chars will run just fine.

Is there a limit for the size of the string that can be used in a match clause ?

Thanks
Roberto

Hi @rlattuad

A crash is definitely not what should happen in any case, but the problem may be in your UDF. There’s no limit like 256 chars for the string definitely, perhaps much much bigger limit exists, but not 256 chars.
Can you make sure your UDF is crash-safe and file a bug on GitHub - manticoresoftware/manticoresearch: Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon with more details on the crash and ‘leaflet_pil_preview_name’ source code?

Hi Sergey,

the crash is not related to the UDF in fact I have tested the query without it and it crashes just the same.

I am filing a bug for this, strange there are no set limits on the match string though

Thanks
Roberto

As discussed on GitHub pls try a new version https://manticoresearch.com/downloads/ as there’s a high change the problem is already fixed.

I have installed version 3.1 and tested it, the problem seems to be fixed.

Great, thanks for letting us know.