Server crash on simple match query: match string max size


#1

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


#2

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 https://github.com/manticoresoftware/manticore with more details on the crash and ‘leaflet_pil_preview_name’ source code?


#3

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


#4

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


#5

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


#6

Great, thanks for letting us know.