@@ -1313,3 +1313,17 @@ def test_mod_8568(env:Env):
13131313 env .expect ('FT.SEARCH' , 'idx' , '*' , 'GEOFILTER' , 'g' , '1.1' , '1.1' , '1' , 'km' ).equal (expected )
13141314 env .expect ('FT.SEARCH' , 'idx' , '*' , 'GEOFILTER' , 'g' , '1.1' , '1.1' , '1' , 'km' ,
13151315 'GEOFILTER' , 'g' , '1.1' , '1.1' , '1000' , 'km' ).equal (expected )
1316+
1317+ @skip (cluster = True )
1318+ def test_mod_6786 (env :Env ):
1319+ # Test search of long term (>128) inside text field
1320+ MAX_NORMALIZE_SIZE = 128
1321+ env .expect ('FT.CREATE' , 'idx' , 'SCHEMA' , 't' , 'TEXT' ).ok ()
1322+
1323+ long_term = 'A' * (MAX_NORMALIZE_SIZE + 1 )
1324+ text_with_long_term = ' ' .join ([long_term , long_term [:MAX_NORMALIZE_SIZE // 2 ]])
1325+ env .cmd ('HSET' , 'doc1' , 't' , text_with_long_term )
1326+
1327+ # Searching for the long term should return the document
1328+ # Before fix, the long term was partialy normalized and the document was not found
1329+ env .expect ('FT.SEARCH' , 'idx' , long_term ).equal ([1 , 'doc1' , ['t' , text_with_long_term ]])
0 commit comments