Ë
    3ýjè9 ã                   óî  — d dl Z d dlZd dlmZmZmZmZmZmZ d dl	m
Z
 d dlmZmZ d dlmZmZmZmZ d dlmZmZ d dlmZ d dlmZmZmZmZmZ d	d
lmZm Z  ddl!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>d Z?d!Z@d"ZAd#ZBd$ZCd%ZDd&ZEd'ZFd(ZGd)ZHd*ZId+ZJd,ZKd-ZLd.ZMd/ZNd0ZOd1ZPd2ZQd3ZRd4ZSd5ZTd6ZUd7ZVd8ZWd9ZXd:ZYd;ZZd<Z[d=Z\d>Z] G d?„ d@«      Z^ G dA„ dBe^«      Z_y)Cé    N)ÚAnyÚDictÚListÚOptionalÚSetÚUnion)Úpairs_to_dict)ÚNEVER_DECODEÚPipeline)ÚCombineResultsMethodÚHybridCursorQueryÚHybridPostProcessingConfigÚHybridQuery)ÚHybridCursorResultÚHybridResult)ÚKeyT)Úcheck_protocol_versionÚdecode_field_valueÚdeprecated_functionÚexperimental_methodÚstr_if_bytesé   )Úget_legacy_responsesÚget_protocol_versioné   )ÚAggregateRequestÚAggregateResultÚCursor)ÚDocument)ÚField)ÚIndexDefinition)ÚProfileInformation)ÚQuery)ÚResult)ÚSuggestionParserÚNUMERICz	FT.CREATEzFT.ALTERz	FT.SEARCHzFT.ADDz
FT.ADDHASHzFT.DROPINDEXz
FT.EXPLAINzFT.EXPLAINCLIzFT.DELzFT.AGGREGATEz
FT.PROFILEz	FT.CURSORzFT.SPELLCHECKz
FT.DICTADDz
FT.DICTDELzFT.DICTDUMPzFT.MGETz	FT.CONFIGz
FT.TAGVALSzFT.ALIASADDzFT.ALIASUPDATEzFT.ALIASDELzFT.ALIASLISTzFT.INFOz	FT.SUGADDz	FT.SUGDELz	FT.SUGLENz	FT.SUGGETzFT.SYNUPDATEz
FT.SYNDUMPz	FT.HYBRIDÚ	NOOFFSETSÚNOFIELDSÚNOHLÚNOFREQSÚMAXTEXTFIELDSÚ	TEMPORARYÚ	STOPWORDSÚSKIPINITIALSCANÚ
WITHSCORESÚFUZZYÚWITHPAYLOADSc                   óª  — e Zd ZdZ eeeeee	h«      Z
d„ Zd„ Zed†d„«       Zed„ «       Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z eh d£«      Zed„ «       Zd„ Zd„ Zd„ Zd„ Z d„ Z!d„ Z"d„ Z#d„ Z$d„ Z%d„ Z&ed„ «       Z'ed„ «       Z(d „ Z)d!„ Z*d"„ Z+d#„ Z,d$„ Z-ed‡d%„«       Z.ed&„ «       Z/d'„ Z0ed(„ «       Z1d)„ Z2d*„ Z3d+„ Z4d,„ Z5dˆd-„Z6	 	 	 	 	 	 	 	 	 d‰d.e7e8   d/e9d0e9d1e:e7e;      d2e:e<   d3e9d4e9d5e9fd6„Z=d.e>e8e7e8   f   fd7„Z?d‡d8e9fd9„Z@	 	 	 	 	 	 	 	 dŠd:„ZA	 d‹d;„ZB eCd<d=¬>«      	 	 	 	 	 	 	 dŒd?e;d@e9dAeDdBe:e9   dCe9dDe9dEe:e;   dFe9d.e7e;   fdG„«       ZE eCd<d=¬>«      d�dH„«       ZF eCd<dI¬>«      dŽdJ„«       ZGd†dKe:eHe;eIf      fdL„ZJ eCd<dI¬>«      dM„ «       ZKdN„ ZLdOe:eHe;e>e;eMeDeNf   f      fdP„ZOdOe:eHe;e>e;eMeDeNf   f      fdQ„ZP	 d†dRe>e;eQf   dOe>eHe;e>e;eMeDeNf   f   df   fdS„ZR eS«       	 	 	 	 	 d�dReTdTe:eU   dUe:eV   dVe:eHe;e>e;eMeDeNf   f      dWe:eM   dXe:eW   dYe>eXeYeZf   fdZ„«       Z[	 d†dRe>e;eQf   dOe:eHe;e>e;eMeDeNf   f      fd[„Z\dRe>e;eQf   fd\„Z]	 d†dRe>e^e_f   dOe:eHe;e>e;eMeDeNf   f      fd]„Z`d^e7dRe>e^e_f   d_e9fd`„Za	 	 d�dRe>eQe^f   dae9dOe:eHe;e>e;eMeDeNf   f      dYe>ebe>ecedf   eef   eef   fdb„Zfd‘dc„Zgdde;dee7e;   fdf„Zhdde;dee7e;   fdg„Zidde;fdh„Zj eCdidj¬>«      dke;dle;dYe9fdm„«       Zk eCdidn¬>«      dke;dYe;fdo„«       Zldpe;fdq„Zmdrenfds„Zodrenfdt„Zpdrenfdu„ZqdYere;eNz     fdv„Zsdw„ Ztdxe;dYeMfdy„Zudxe;dze;dYeMfd{„Zv	 	 	 	 d’dxe;d|e;d}e9d~eMde9d€e9dYe7ew   fd�„Zxd‡d‚e;dƒe9dee7e;   fd„„Zyd…„ Zzy)“ÚSearchCommandszSearch commands.c                 ó´  — t         | j                  t        | j                  t        | j
                  t        | j                  t        | j                  t        | j                  t        | j                  t        | j                  t         | j"                  i	| _        t        | j&                  t        | j(                  t         | j"                  i| _        t         | j,                  t        | j.                  t        | j0                  t        | j2                  t        | j4                  t        | j6                  t        | j8                  t        | j:                  t         | j"                  i	| _        t        | j>                  t        | j@                  t         | j"                  i| _!        t         | j"                  i| _"        t         | jF                  t        | j                  t        | jH                  t        | j                  t        | jJ                  t        | j                  t        | jL                  t        | jN                  t         | j"                  i	| _(        tS        | j<                  «      | _*        | jV                  | jT                  t         <   | jX                  | jT                  t        <   | jZ                  | jT                  t        <   | j\                  | jT                  t        <   y)a  Build the per-protocol module callback maps.

        Called from ``Search.__init__``, ``Pipeline.__init__`` and
        ``AsyncPipeline.__init__`` so the mapping lives in a single place
        rather than being duplicated across all three classes.
        N)/ÚINFO_CMDÚ_parse_infoÚ
SEARCH_CMDÚ_parse_searchÚ
HYBRID_CMDÚ_parse_hybrid_searchÚAGGREGATE_CMDÚ_parse_aggregateÚPROFILE_CMDÚ_parse_profileÚSPELLCHECK_CMDÚ_parse_spellcheckÚ
CONFIG_CMDÚ_parse_config_getÚSYNDUMP_CMDÚ_parse_syndumpÚALIAS_LIST_CMDÚ_parse_aliaslistÚ_RESP2_MODULE_CALLBACKSÚ_parse_search_resp3_nativeÚ!_parse_hybrid_search_resp3_nativeÚ_RESP3_MODULE_CALLBACKSÚ_parse_info_resp3_to_legacyÚ_parse_search_resp3Ú_parse_hybrid_search_resp3Ú_parse_aggregate_resp3Ú_parse_profile_resp3Ú_parse_spellcheck_resp3Ú!_parse_config_get_resp3_to_legacyÚ_parse_syndump_resp3Ú'_RESP3_TO_RESP2_LEGACY_MODULE_CALLBACKSÚ&_pipeline_parse_search_resp3_to_legacyÚ-_pipeline_parse_hybrid_search_resp3_to_legacyÚ)_RESP3_TO_RESP2_LEGACY_PIPELINE_CALLBACKSÚ _RESP2_LEGACY_PIPELINE_CALLBACKSÚ_parse_info_unifiedÚ_parse_hybrid_search_unifiedÚ_parse_profile_unifiedÚ_parse_config_get_unifiedÚ_parse_syndump_unifiedÚ_RESP2_UNIFIED_MODULE_CALLBACKSÚdictÚ_RESP3_UNIFIED_MODULE_CALLBACKSÚ_parse_info_resp3Ú_parse_config_get_resp3Ú_parse_profile_resp3_unifiedÚ"_parse_hybrid_search_resp3_unified)Úselfs    úX/root/telegram-saas/.venv/lib/python3.12/site-packages/redis/commands/search/commands.pyÚ_init_module_callbacksz%SearchCommands._init_module_callbacks`   s:  € ô �d×&Ñ&Ü˜×*Ñ*Ü˜×1Ñ1Ü˜4×0Ñ0Ü˜×,Ñ,Ü˜D×2Ñ2Ü˜×.Ñ.Ü˜×,Ñ,Ü˜D×1Ñ1ð
(
ˆÔ$ô$ ˜×7Ñ7Ü˜×>Ñ>Ü˜D×1Ñ1ð(
ˆÔ$ô �d×6Ñ6Ü˜×0Ñ0Ü˜×7Ñ7Ü˜4×6Ñ6Ü˜×2Ñ2Ü˜D×8Ñ8Ü˜×>Ñ>Ü˜×2Ñ2Ü˜D×1Ñ1ð
8
ˆÔ4ô  ˜×CÑCÜ˜×JÑJÜ˜D×1Ñ1ð:
ˆÔ6ô ˜D×1Ñ1ð1
ˆÔ-ô �d×.Ñ.Ü˜×*Ñ*Ü˜×9Ñ9Ü˜4×0Ñ0Ü˜×4Ñ4Ü˜D×2Ñ2Ü˜×6Ñ6Ü˜×4Ñ4Ü˜D×1Ñ1ð
0
ˆÔ,ô 04Ø×8Ñ8ó0
ˆÔ,ð :>×9OÑ9Oˆ×,Ñ,¬XÑ6Ø;?×;WÑ;Wˆ×,Ñ,¬ZÑ8à×-Ñ-ð 	×,Ñ,¬[Ñ9ð ×3Ñ3ð 	×,Ñ,¬ZÒ8ó    c                 ó  — || j                   v rd|vr|S t        | j                  «      }t        | j                  «      }|rx|dv r0|t        k(  rt        |«      S | j                  j                  |«      }n‡t        |d«      r| j                  j                  |«      }n_| j                  j                  |«      }nCt        |d«      r| j                  j                  |«      }n| j                  j                  |«      }|€|S  ||fi |¤ŽS )NÚquery)é   Ú3rj   )Ú_QUERY_REQUIRED_CMDSr   Úclientr   r=   r"   rJ   Úgetr   rS   rG   r_   r]   )rd   ÚcmdÚresÚkwargsÚprotocolÚlegacyÚcbs          re   Ú_parse_resultszSearchCommands._parse_results½   sò   € Ø�$×+Ñ+Ñ+°¸vÑ0EØˆJÜ'¨¯©Ó4ˆÜ% d§k¡kÓ2ˆÙØ˜8Ñ#Øœ+Ò%Ü-¨cÓ2Ð2Ø×1Ñ1×5Ñ5°cÓ:‘Ü'¨°!Ô4Ø×AÑA×EÑEÀcÓJ‘à×1Ñ1×5Ñ5°cÓ:‘ä% h°Ô2Ø×9Ñ9×=Ñ=¸cÓB‘à×9Ñ9×=Ñ=¸cÓB�Øˆ:ØˆJÙ�#Ñ ˜Ñ Ð rg   Nc                 ó†   — t        | t        «      s|S | j                  || j                  |j                  «       |«      «      S ©N)Ú
isinstancer^   rn   Úencode)ÚmappingÚkeyÚdefaults      re   Ú
_resp3_getzSearchCommands._resp3_getÔ   s3   € ä˜'¤4Ô(ØˆNØ�{‰{˜3 §¡¨C¯J©J«L¸'Ó BÓCÐCrg   c                 ó´   — t        | t        «      s| S g }| j                  «       D ]0  \  }}|j                  t	        |«      «       |j                  |«       Œ2 |S rw   )rx   r^   ÚitemsÚappendr   )rz   Úflatr{   Úvalues       re   Ú_flatten_resp3_mappingz%SearchCommands._flatten_resp3_mappingÚ   sS   € ä˜'¤4Ô(ØˆNØˆØ!Ÿ-™-›/ò 	‰JˆC�Ø�K‰Kœ SÓ)Ô*Ø�K‰K˜Õð	ð ˆrg   c           
      ó  — |j                  d«      }|�t        |t        «      s|S | j                  |dd«      g}| j                  |dg «      D ]»  }|j	                  | j                  |d«      «       |j
                  r!|j	                  | j                  |d«      «       |j                  r!|j	                  | j                  |d«      «       |j                  rŒ‹|j	                  | j                  | j                  |di «      «      «       Œ½ |S )	zDConvert RESP3 FT.SEARCH pipeline output to raw RESP2 pipeline shape.ri   Útotal_resultsr   ÚresultsÚidÚscoreÚpayloadÚextra_attributes)	rn   rx   r^   r}   r€   Ú_with_scoresÚ_with_payloadsÚ_no_contentrƒ   )rd   rp   rq   ri   ÚoutputÚitems         re   rT   z5SearchCommands._pipeline_parse_search_resp3_to_legacyä   sæ   € à—
‘
˜7Ó#ˆØˆ=¤
¨3´Ô 5ØˆJà—/‘/ # ¸Ó:Ð;ˆØ—O‘O C¨°BÓ7ò 	ˆDØ�M‰M˜$Ÿ/™/¨$°Ó5Ô6Ø×!Ò!Ø—‘˜dŸo™o¨d°GÓ<Ô=Ø×#Ò#Ø—‘˜dŸo™o¨d°IÓ>Ô?Ø×$Ó$Ø—‘Ø×/Ñ/ØŸ™¨Ð.@À"ÓEóõð	ð ˆrg   c                 óØ  — t        |t        «      s|S |j                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v r$d|j	                  d«      d|j	                  d«      gS |j	                  dg «      D �cg c]%  }t        |t        «      r| j                  |«      n|‘Œ' }}d|j	                  dd«      d|d|j	                  dg «      d|j	                  dd«      gS c c}}w c c}w )	zDConvert RESP3 FT.HYBRID pipeline output to raw RESP2 pipeline shape.ÚcursorÚSEARCHÚVSIMr†   r…   r   ÚwarningsÚexecution_time)rx   r^   r   r   rn   rƒ   )rd   rp   rq   r{   r‚   r�   r†   s          re   rU   z<SearchCommands._pipeline_parse_hybrid_search_resp3_to_legacyù   sô   € ä˜#œtÔ$ØˆJØ:=¿)¹)»+×F©J¨C°Œ|˜CÓ  %Ñ'ÐFˆÑFØ�vÑØ˜cŸg™g hÓ/°¸¿¹À»ÐIÐIð Ÿ™ 	¨2Ó.ö
àô 2<¸DÄ$Ô1GˆD×'Ñ'¨Ô-ÈTÑQð
ˆð 
ð
 Ø�G‰G�O QÓ'ØØØØ�G‰G�J Ó#ØØ�G‰GÐ$ aÓ(ð	
ð 		
ùó Gùò
s   ¦C!Á;*C'c                 óL   — t        t        |«      }t        t        ||«      «      S rw   )Úmapr   r^   Úzip)rd   rp   rq   Úits       re   r6   zSearchCommands._parse_info  s   € Ü”˜sÓ#ˆÜ”C˜˜B“KÓ Ð rg   c                 ó0   — |rt        |«      S t        «       S rw   )Úset©rd   rp   rq   s      re   rF   zSearchCommands._parse_aliaslist  s   € ñ Œs�3‹xÐ)¤C£EÐ)rg   c           	      ó”   — t        ||d   j                   |d   |d   j                  |d   j                  |d   j                  ¬«      S )Nri   Úduration)rž   Úhas_payloadÚwith_scoresÚfield_encodings)r$   r�   rŒ   r‹   Ú_return_fields_decode_asrœ   s      re   r8   zSearchCommands._parse_search   sQ   € ÜØØ�w‘×+Ñ+Ð+Ø˜JÑ'Ø˜w™×6Ñ6Ø˜w™×4Ñ4Ø" 7™O×DÑDô
ð 	
rg   c           	      ó  — t        |d¬«      }d|v r%t        t        |d   «      t        |d   «      ¬«      S g }|d   D ]   }t        |d¬«      }|j                  |«       Œ" t	        t        |d   «      ||d	   t        |d
   «      ¬«      S )NT©Údecode_keysr‘   r’   r“   ©Úsearch_cursor_idÚvsim_cursor_idr†   r…   r”   r•   ©r…   r†   r”   r•   )r	   r   Úintr€   r   Úfloat)rd   rp   rq   Úres_dictr†   Úres_itemÚ	item_dicts          re   r:   z#SearchCommands._parse_hybrid_search*  s§   € Ü  °$Ô7ˆØ�vÑÜ%Ü!$ X¨hÑ%7Ó!8Ü" 8¨FÑ#3Ó4ôð ð
 )+ˆð ! Ñ+ò 	&ˆHÜ% h¸DÔAˆIØ�N‰N˜9Õ%ð	&ô Ü˜h Ñ7Ó8ØØ˜jÑ)Ü  Ð*:Ñ!;Ó<ô	
ð 	
rg   c                 ó4   — | j                  ||d   |d   «      S )Nri   Ú
has_cursor)Ú_get_aggregate_resultrœ   s      re   r<   zSearchCommands._parse_aggregate@  s    € Ø×)Ñ)¨#¨v°g©ÀÀ|Ñ@TÓUÐUrg   c                 óø   — |d   }t        |t        «      r!| j                  |d   ||j                  «      }n5t	        |d   |j
                   |d   |j                  |j                  ¬«      }|t        |d   «      fS )Nri   r   rž   ©rž   rŸ   r    r   )	rx   r   r±   Ú_cursorr$   r�   rŒ   r‹   r"   )rd   rp   rq   ri   Úresults        re   r>   zSearchCommands._parse_profileC  s€   € Ø�w‘ˆÜ�eÔ-Ô.Ø×/Ñ/°°A±¸¸u¿}¹}ÓM‰FäØ�A‘Ø×%Ñ%Ð%Ø 
Ñ+Ø!×0Ñ0Ø!×.Ñ.ôˆFð Ô)¨#¨a©&Ó1Ð1Ð1rg   c                 óÜ   — i }|dk(  r|S |D ]X  }t        |t        «      r|dk(  rŒt        |«      dk7  rŒ(|d   sŒ.|d   d   sŒ7|d   D �cg c]  }|d   |d   dœ‘Œ c}||d   <   ŒZ |S c c}w )Nr   rj   r   r   ©rˆ   Ú
suggestion)rx   rª   Úlen)rd   rp   rq   ÚcorrectionsÚ_correctionÚ_items         re   r@   z SearchCommands._parse_spellcheckR  s¡   € ØˆØ�!Š8ØÐàò 	ˆKÜ˜+¤sÔ+°¸qÒ0@Øä�;Ó 1Ò$ØØ˜q’>ØØ˜q‘> !Ò$Øð$ JUÐUVÉö+Ø@E˜% ™(°%¸±(Ó;ò+ˆK˜ A™Ò'ð5	ð< Ðùò	+s   Á
A)c                 óB   — |r|D �ci c]  }|d   |d   “Œ c}S i S c c}w ©Nr   r   © ©rd   rp   rq   Úkvss       re   rB   z SearchCommands._parse_config_getw  s)   € Ù25¨#Ö. 3��A‘˜˜A™‘Ò.Ð=¸2Ð=ùÒ.s   ‡c                 óh   — t        dt        |«      d«      D �ci c]  }||   ||dz      “Œ c}S c c}w ©Nr   r   r   )Úranger¹   )rd   rp   rq   Úis       re   rD   zSearchCommands._parse_syndumpz  s4   € Ü,1°!´S¸³X¸qÓ,AÖB q��A‘˜˜A ™E™
Ñ"ÒBÐBùÒBs   ™/>   ÚtypeÚWEIGHTÚPHONETICÚ	SEPARATORÚ	attributeÚ
identifierc                 ó  — i }g }t         j                  }d}|t        | «      k  rbt        | |   «      }||v r+|dz   t        | «      k  rt        | |dz      «      ||<   |dz  }n|j	                  |«       |dz  }|t        | «      k  rŒb||d<   |S )aC  Convert a RESP2 flat attribute list into a RESP3-style dict.

        RESP2 format: ``[identifier, name, attribute, alias, type, TEXT,
        WEIGHT, 1, SORTABLE, NOSTEM]``.
        RESP3 format: ``{"identifier": name, "attribute": alias, "type":
        "TEXT", "WEIGHT": "1", "flags": ["SORTABLE", "NOSTEM"]}``.
        r   r   r   Úflags)r3   Ú_INFO_ATTR_PAIR_KEYSr¹   r   r€   )Ú	attr_listrµ   rÍ   Ú	pair_keysrÅ   r{   s         re   Ú_normalize_info_attributez(SearchCommands._normalize_info_attribute…  s¢   € ð ˆØˆÜ"×7Ñ7ˆ	ØˆØ”#�i“.Ò Ü˜y¨™|Ó,ˆCØ�iÑ A¨¡E¬C°	«NÒ$:Ü*¨9°Q¸±UÑ+;Ó<��s‘Ø�Q‘‘à—‘˜SÔ!Ø�Q‘�ð ”#�i“.Ó ð  ˆˆw‰Øˆrg   c                 óö   — t        t        |«      }t        t        ||«      «      }d|v rJt	        |d   t
        «      r7|d   D �cg c]%  }t	        |t
        «      r| j                  |«      n|‘Œ' c}|d<   |S c c}w )z‚Parse FT.INFO into the unified shape with ``attributes`` as a
        list of dicts so RESP2 output matches RESP3 output.
        Ú
attributes)r—   r   r^   r˜   rx   ÚlistrÑ   )rd   rp   rq   r™   ÚinfoÚattrs         re   rX   z"SearchCommands._parse_info_unified�  s�   € ô ”˜sÓ#ˆÜ”C˜˜B“KÓ ˆØ˜4Ñ¤J¨t°LÑ/AÄ4Ô$Hð ! Ñ.ö"àô 9CÀ4ÌÔ8N�×.Ñ.¨tÔ4ÐTXÑXò"ˆD�Ñð ˆùò	"s   Á*A6c                 ó¬  — t        |d¬«      }d|v r%t        t        |d   «      t        |d   «      ¬«      S  | j                  di |¤Ž}g }|d   D ]S  }t        |d¬«      }|j	                  |j                  «       D ��	ci c]  \  }}	|| j                  |	||«      “Œ c}	}«       ŒU t        t        |d   «      ||d	   t        |d
   «      ¬«      S c c}	}w )NTr¤   r‘   r’   r“   r¦   r†   r…   r”   r•   r©   r¿   )	r	   r   rª   Ú_hybrid_field_encodingsr€   r   Ú_decode_hybrid_field_valuer   r«   )
rd   rp   rq   r¬   r¡   r†   r­   r®   r{   r‚   s
             re   rY   z+SearchCommands._parse_hybrid_search_unifiedª  sö   € Ü  °$Ô7ˆØ�vÑÜ%Ü!$ X¨hÑ%7Ó!8Ü" 8¨FÑ#3Ó4ôð ð
 7˜$×6Ñ6Ñ@¸Ñ@ˆà(*ˆØ  Ñ+ò 	ˆHÜ% h¸DÔAˆIØ�N‰Nð '0§o¡oÓ&7÷á"˜˜Uð ˜×8Ñ8¸ÀÀ_ÓUÑUóõð	ô Ü˜h Ñ7Ó8ØØ˜jÑ)Ü  Ð*:Ñ!;Ó<ô	
ð 	
ùós   Á>Cc                 ól  — |d   }t        |t        «      r!| j                  |d   ||j                  «      }n5t	        |d   |j
                   |d   |j                  |j                  ¬«      }|d   }t        |t        «      r(|r&t        |d   t        t        f«      rt        |d¬«      }|t        |«      fS )z‡Parse FT.PROFILE into ``(result, ProfileInformation)`` with
        the profile_data normalised to a dict on >= 7.9.0 servers.
        ri   r   rž   r³   r   Tr¤   )rx   r   r±   r´   r$   r�   rŒ   r‹   rÔ   ÚstrÚbytesr	   r"   )rd   rp   rq   ri   rµ   Úprofile_datas         re   rZ   z%SearchCommands._parse_profile_unifiedÅ  s´   € ð �w‘ˆÜ�eÔ-Ô.Ø×/Ñ/°°A±¸¸u¿}¹}ÓM‰FäØ�A‘Ø×%Ñ%Ð%Ø 
Ñ+Ø!×0Ñ0Ø!×.Ñ.ôˆFð ˜1‘vˆô �|¤TÔ*ÙÜ˜<¨™?¬S´%¨LÔ9ä(¨À4ÔHˆLàÔ)¨,Ó7Ð7Ð7rg   c                 óf   — |si S |D �ci c]  }t        |d   «      t        |d   «      “Œ c}S c c}w r¾   )r   rÀ   s       re   r[   z(SearchCommands._parse_config_get_unifiedã  s5   € ÙØˆIØFIÖJ¸s”˜S ™VÓ$¤l°3°q±6Ó&:Ñ:ÒJÐJùÒJs   ‰".c                 ó  — |si S t        dt        |«      d«      D ��ci c]U  }t        ||   «      t        ||dz      t        «      r||dz      D �cg c]  }t        |«      ‘Œ c}nt        ||dz      «      “ŒW c}}S c c}w c c}}w rÃ   )rÄ   r¹   r   rx   rÔ   )rd   rp   rq   rÅ   Úss        re   r\   z%SearchCommands._parse_syndump_unifiedè  s‹   € ÙØˆIô
 ˜1œc #›h¨Ó*÷	
ð ô ˜˜Q™Ó Ü˜#˜a !™e™*¤dÔ+ð =@ÀÀAÁ¹JÖ"G°q¤<°¥?Ó"Gä˜c ! a¡%™jÓ)ñ*ó
ð 	
ùÚ"Gùó
s   ž2BÁA<Á"BÁ<Bc           
      ó¢   — |j                  d«      }t        j                  ||j                  dd«      t        |dd«      t        |dd«      ¬«      S )	z4Parse RESP3 FT.SEARCH response into a Result object.ri   rž   r   r‹   Fr¢   N)rž   r    r¡   )rn   r$   Ú
from_resp3Úgetattr)rd   rp   rq   ri   s       re   rL   z"SearchCommands._parse_search_resp3ô  sM   € à—
‘
˜7Ó#ˆÜ× Ñ ØØ—Z‘Z 
¨AÓ.Ü  ~°uÓ=Ü# EÐ+EÀtÓLô	
ð 	
rg   c                 óî  — t        |t        «      s|S |j                  d«      }t        |dd«      }|j	                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v ràg }|d   D ]Ñ  }t        |t        «      s|j                  |«       Œ%|j	                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v rt        |d   «      |d<   |j                  d«      }	t        |	t        «      r:i }
|	j	                  «       D ]   \  }}t        |«      }t        |||«      |
|<   Œ" |
|d<   |j                  |«       ŒÓ ||d<   d|v r|d   D �cg c]  }t        |«      ‘Œ c}|d<   |S c c}}w c c}}w c c}w )a¡  Normalise the RESP3 FT.SEARCH map while preserving its native shape.

        ``protocol=3`` + ``legacy_responses=True`` keeps the RESP3 dict
        surface.  FT.SEARCH uses ``NEVER_DECODE`` (its results may contain
        binary field values such as vector embeddings), so the wire hands
        back raw bytes.  Decode the structural keys and the field values here
        instead of at the wire: text values are decoded leniently while
        binary fields flagged via ``return_field(..., decode_field=False)``
        are preserved as raw bytes.  This keeps the previously decoded native
        surface intact and no longer crashes on non-UTF-8 field data.
        ri   r¢   Nr†   r‡   rŠ   Úwarning)rx   r^   rn   rã   r   r   r€   r   )rd   rp   rq   ri   r¡   ÚkÚvr†   r�   ÚextraÚdecodedÚws               re   rH   z)SearchCommands._parse_search_resp3_nativeþ  s€  € ô ˜#œtÔ$ØˆJØ—
‘
˜7Ó#ˆÜ! %Ð)CÀTÓJˆØ.1¯i©i«k×:¡d a¨Œ|˜A‹ Ñ!Ð:ˆÑ:Ø˜ÑØˆGØ˜I™ò %�Ü! $¬Ô-Ø—N‘N 4Ô(ØØ7;·z±z³|×D©t¨q°!œ Q›¨Ñ*ÐD�ÑDØ˜4‘<Ü!-¨d°4©jÓ!9�D˜‘JØŸ™Ð!3Ó4�Ü˜e¤TÔ*Ø �GØ %§¡£ò O™˜˜1Ü(¨›O˜Ü%7¸¸1¸oÓ%N˜ š
ðOð 07�DÐ+Ñ,Ø—‘˜tÕ$ð%ð %ˆC�	‰NØ˜ÑØ7:¸9±~ÖF°!œl¨1�oÒFˆC�	‰NØˆ
ùó+ ;ùó Eùò Gs   ÁE&Â E,ÅE2c                 óZ  — |j                  d«      }|j                  dd«      }d}|r+t        |t        «      r|d   }t        |«      dkD  r|d   nd}n|}|€i }|j	                  «       D ��ci c]  \  }}t        |«      |“Œ }}}|j                  dg «      D �	cg c]  }	t        |	«      ‘Œ }
}	|j                  dd«      }g }|j                  d	g «      D ]�  }|j	                  «       D ��ci c]  \  }}t        |«      |“Œ }}}|j                  d
i «      }g }|j	                  «       D ]'  \  }}|j                  |«       |j                  |«       Œ) |j                  |«       Œ� d}|r%t        |t        «      r
||_        |}nt        |«      }t        ||d||
¬«      S c c}}w c c}	w c c}}w )zAParse RESP3 FT.AGGREGATE response into an AggregateResult object.ri   r°   Fr   r   Nrå   r…   r†   rŠ   )Útotalr”   )
rn   rx   rÔ   r¹   r   r   r€   r   Úcidr   )rd   rp   rq   ri   r°   Ú	cursor_idÚdataræ   rç   rê   r”   rì   ÚrowsÚresult_itemÚextra_attrsr�   r‘   s                    re   rN   z%SearchCommands._parse_aggregate_resp3%  s¥  € à—
‘
˜7Ó#ˆØ—Z‘Z ¨eÓ4ˆ
ð ˆ	Ùœ* S¬$Ô/Ø�q‘6ˆDÜ"% c£(¨Q¢,˜˜Aš°A‰IàˆDàˆ<ØˆDð 04¯z©z«|×<¡t q¨!”˜Q“ Ñ"Ð<ˆÑ<à-1¯X©X°iÀÓ-DÖE¨”L •OÐEˆÐEØ—‘˜¨!Ó,ˆàˆØŸ8™8 I¨rÓ2ò 		ˆKØ:E×:KÑ:KÓ:M×N±$°!°Qœ<¨›?¨AÑ-ÐNˆKÑNØ%Ÿ/™/Ð*<¸bÓAˆKð ˆDØ#×)Ñ)Ó+ò ‘��1Ø—‘˜A”Ø—‘˜A•ðð �K‰K˜Õð		ð ˆÙÜ˜%¤Ô(Ø%�”	Ø‘ä 	Ó*�ä˜t V¨T¸ÈÔRÐRùó3 =ùâEùó
 Os   Á,FÂF"Ã)F'c                 ój  — |j                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v r%t        t        |d   «      t        |d   «      ¬«      S g }|j	                  dg «      D ]k  }t        |t        «      r=|j                  |j                  «       D ��ci c]  \  }}t        |«      |“Œ c}}«       ŒP|j                  t        |d¬«      «       Œm t        t        |j	                  dd	«      «      ||j	                  d
g «      t        |j	                  dd	«      «      ¬«      S c c}}w c c}}w )a4  Parse RESP3 FT.HYBRID response into HybridResult/HybridCursorResult.

        Top-level keys are normalised to strings.  Values are preserved
        as delivered by the wire (bytes when ``NEVER_DECODE`` is set,
        strings otherwise) so byte/str semantics match the RESP2 legacy
        parser.
        r‘   r’   r“   r¦   r†   Tr¤   r…   r   r”   r•   r©   )r   r   r   rª   rn   rx   r^   r€   r	   r   r«   )rd   rp   rq   ræ   rç   r†   r­   s          re   rM   z)SearchCommands._parse_hybrid_search_resp3T  s  € ð /2¯i©i«k×:¡d a¨Œ|˜A‹ Ñ!Ð:ˆÑ:Ø�vÑÜ%Ü!$ S¨¡]Ó!3Ü" 3 v¡;Ó/ôð ð
 )+ˆØŸ™ 	¨2Ó.ò 	JˆHÜ˜(¤DÔ)Ø—‘¸x¿~¹~Ó?O×P±t°q¸!¤¨Q£°Ñ 2ÓPÕQà—‘œ}¨XÀ4ÔHÕIð		Jô Ü˜cŸg™g o°qÓ9Ó:ØØ—W‘W˜Z¨Ó,Ü  §¡Ð)9¸1Ó!=Ó>ô	
ð 	
ùó ;ùó  Qs   ”D)ÂD/c                 ó8  — |j                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v r%t        t        |d   «      t        |d   «      ¬«      S  | j                  di |¤Ž}g }|j                  dg «      D ]º  }t        |t        «      rW|j                  |j                  «       D ��	ci c]+  \  }}	t        |«      | j                  |	t        |«      |«      “Œ- c}	}«       Œjt        |d¬«      }
|j                  |
j                  «       D ��	ci c]  \  }}	|| j                  |	||«      “Œ c}	}«       Œ¼ t        t        |j                  dd	«      «      ||j                  d
g «      t        |j                  dd	«      «      ¬«      S c c}}w c c}	}w c c}	}w )z=Parse RESP3 FT.HYBRID into the approved unified HybridResult.r‘   r’   r“   r¦   r†   Tr¤   r…   r   r”   r•   r©   r¿   )r   r   r   rª   rØ   rn   rx   r^   r€   rÙ   r	   r   r«   )rd   rp   rq   ræ   rç   r¡   r†   r­   r{   r‚   r®   s              re   rc   z1SearchCommands._parse_hybrid_search_resp3_unifiedq  s—  € à.1¯i©i«k×:¡d a¨Œ|˜A‹ Ñ!Ð:ˆÑ:Ø�vÑÜ%Ü!$ S¨¡]Ó!3Ü" 3 v¡;Ó/ôð ð
 7˜$×6Ñ6Ñ@¸Ñ@ˆà(*ˆØŸ™ 	¨2Ó.ò 	ˆHÜ˜(¤DÔ)Ø—‘ð
 +3¯.©.Ó*:÷	ñ '˜C ô % SÓ)¨4×+JÑ+JØ!¤<°Ó#4°oó,ñ óõô *¨(ÀÔE�	Ø—‘ð
 +4¯/©/Ó*;÷	ñ '˜C ð ˜T×<Ñ<Ø! 3¨óñ óõð	ô* Ü˜cŸg™g o°qÓ9Ó:ØØ—W‘W˜Z¨Ó,Ü  §¡Ð)9¸1Ó!=Ó>ô	
ð 	
ùó? ;ùóùós   ”F
Â-0FÄFc                  ó„   — i }dD ]4  }| j                  |«      }t        |dd «      }|sŒ$|j                  |«       Œ6 |xs d S )N)ri   Úpost_processingr¢   )rn   rã   Úupdate)rq   Ú	encodingsÚsource_nameÚsourceÚsource_encodingss        re   rØ   z&SearchCommands._hybrid_field_encodings™  sS   € àˆ	Ø7ò 	3ˆKØ—Z‘Z Ó,ˆFÜ& vÐ/IÈ4ÓPÐÚØ× Ñ Ð!1Õ2ð		3ð
 Ò ˜DÐ rg   c                 ó,   — |r||vr| S t        | ||«      S rw   )r   )r‚   r{   r¡   s      re   rÙ   z)SearchCommands._decode_hybrid_field_value£  s    € á #¨_Ñ"<ØˆLÜ! %¨¨oÓ>Ð>rg   c                 ó¬  — |j                  «       D ��ci c]  \  }}t        |«      |“Œ }}}d|v r|S d|v rb|d   D ���cg c]L  }t        |t        «      r-|j                  «       D ��ci c]  \  }}t        |«      |“Œ c}}nt	        |d¬«      ‘ŒN c}}}|d<   d|v r|d   D �cg c]  }t        |«      ‘Œ c}|d<   |S c c}}w c c}}w c c}}}w c c}w )a[  Normalise RESP3 FT.HYBRID map keys while preserving native shape.

        ``protocol=3`` + ``legacy_responses=True`` keeps the RESP3 dict
        surface, but HYBRID uses ``NEVER_DECODE`` so result values mirror
        legacy RESP2 bytes. Decode only structural keys so callers can use
        the same native RESP3 key names as before.
        r‘   r†   Tr¤   r”   )r   r   rx   r^   r	   )rd   rp   rq   ræ   rç   r�   rê   s          re   rI   z0SearchCommands._parse_hybrid_search_resp3_native©  sá   € ð /2¯i©i«k×:¡d a¨Œ|˜A‹ Ñ!Ð:ˆÑ:Ø�vÑØˆJà˜Ñð
   	™N÷	ð ð ô ˜d¤DÔ)ð 15·
±
³×=©¨¨1”˜a“ !Ñ#Ô=ä" 4°TÔ:ñ;ôˆC�	‰Nð ˜ÑØ8;¸J¹ÖH°1œ|¨A�ÒHˆC�
‰OØˆ
ùó ;ùó >ùôùò Is#   ”B>Á (C
Á(CÁ>C
Â$CÃC
c                 óÊ  — t        |t        «      s | j                  |fi |¤ŽS |j                  «       D ��ci c]  \  }}t	        |«      |“Œ }}}i }|j                  di «      }|j                  «       D ]f  \  }}|sŒ	g }	|D ]O  }
|
j                  «       D ]:  \  }}t        |«      }|j                  d«      r|dd }|	j                  ||dœ«       Œ< ŒQ |	sŒb|	||<   Œh |S c c}}w )a#  Parse RESP3 FT.SPELLCHECK response into unified format.

        RESP3 format:
            {"results": {"term": [{"suggestion": score}, ...], ...}}
        Unified format (matches RESP2 parsed output):
            {"term": [{"score": score_str, "suggestion": suggestion}, ...], ...}
        r†   z.0Néþÿÿÿr·   )	rx   r^   r@   r   r   rn   rÛ   Úendswithr€   )rd   rp   rq   ræ   rç   rº   r†   ÚtermÚsuggestionsÚterm_correctionsÚsuggestion_dictr¸   rˆ   Ú	score_strs                 re   rP   z&SearchCommands._parse_spellcheck_resp3Â  s  € ô ˜#œtÔ$Ø)�4×)Ñ)¨#Ñ8°Ñ8Ð8ð /2¯i©i«k×:¡d a¨Œ|˜A‹ Ñ!Ð:ˆÑ:ØˆØ—'‘'˜) RÓ(ˆØ!(§¡£ò 	5ÑˆD�+ÙØØ!ÐØ#.ò �Ø)8×)>Ñ)>Ó)@ò Ñ%�J ô !$ E£
�IØ ×)Ñ)¨$Ô/Ø$-¨c¨r N˜	ð %×+Ñ+Ø"+¸:ÑFõñðò  Ø$4�˜DÒ!ð'	5ð( Ðùó/ ;s   ·Cc           	      ó¼  — |d   }|j                  d«      }|€|j                  d«      }|€|j                  d«      }|€|j                  d«      }|€|j                  d«      }|j                  d«      }|€|j                  d«      }|€|j                  d	«      }|€|j                  d
«      }|€|j                  d«      }t        |t        «      rt        |«      |dœ}t        |t        «      r(| j                  ||t        |j                  «      ¬«      }n3t        j                  ||j                  dd«      t        |dd«      ¬«      }| j                  |«      }||fS )zÓExtract ``(result, profile_data_dict)`` from a RESP3 FT.PROFILE
        response.  ``profile_data_dict`` has its keys/values normalised
        to strings but is otherwise left as the native RESP3 dict.
        ri   ÚResultss   Resultsr†   s   resultsr   ÚProfiles   ProfileÚprofiles   profiler   )r…   r†   ©ri   r°   rž   r‹   F)rž   r    )rn   rx   rÔ   r¹   r   rN   Úboolr´   r$   râ   rã   Ú_to_string_recursive)rd   rp   rq   ri   Úresults_datarÝ   rµ   s          re   Ú_extract_resp3_profile_partsz+SearchCommands._extract_resp3_profile_partsê  se  € ð
 �w‘ˆð —w‘w˜yÓ)ˆØÐØŸ7™7 :Ó.ˆLØÐØŸ7™7 9Ó-ˆLØÐØŸ7™7 :Ó.ˆLØÐØŸ7™7 1›:ˆLØ—w‘w˜yÓ)ˆØÐØŸ7™7 :Ó.ˆLØÐØŸ7™7 9Ó-ˆLØÐØŸ7™7 :Ó.ˆLØÐØŸ7™7 1›:ˆLô
 �l¤DÔ)ä!$ \Ó!2Ø'ñˆLô �eÔ-Ô.Ø×0Ñ0Ø E´d¸5¿=¹=Ó6Ið 1ó ‰Fô ×&Ñ&ØØŸ™ J°Ó2Ü# E¨>¸5ÓAôˆFð
 ×0Ñ0°Ó>ˆØ�|Ð#Ð#rg   c                 óè   — t        |t        «      r | j                  |fi |¤ŽS  | j                  |fi |¤Ž\  }}t        |t        «      rd|v xs d|v }| j                  ||¬«      }|t        |«      fS )a°  Parse RESP3 FT.PROFILE response into ``(result, ProfileInformation)``.

        RESP3 format (aligned, RediSearch >= MOD-6816):
            {"Results": {search/aggregate result dict},
             "Profile": {profile information dict}}

        Older RediSearch versions may return a list (same as RESP2) even
        when the connection uses RESP3.  In that case we delegate to the
        RESP2 ``_parse_profile`` parser.
        ÚShardsÚCoordinator)Úflat_top)rx   rÔ   r>   r  r^   Ú_resp3_profile_dict_to_listr"   )rd   rp   rq   rµ   rÝ   r  s         re   rO   z#SearchCommands._parse_profile_resp3  s�   € ô �cœ4Ô Ø&�4×&Ñ& sÑ5¨fÑ5Ð5à@˜t×@Ñ@ÀÑOÈÑOÑˆ�ô �l¤DÔ)Ø <Ð/ÒP°=ÀLÐ3PˆHØ×;Ñ;Ø xð <ó ˆLð Ô)¨,Ó7Ð7Ð7rg   c                 óà   — t        |t        «      r | j                  |fi |¤ŽS  | j                  |fi |¤Ž\  }}t        |t        «      rd|v sd|v s| j                  |«      }|t        |«      fS )aÇ  Parse RESP3 FT.PROFILE for the unified shape.

        Redis < 7.9.0 returns RESP2 profile data as nested list-of-pairs,
        while RESP3 returns the same data as a dict.  Convert that pre-7.9
        RESP3 dict back to the RESP2 list shape so the unified surface is
        protocol-independent.  Redis >= 7.9.0 coordinator profiles contain
        ``Shards``/``Coordinator`` keys and stay as dicts, matching the
        RESP2 unified parser.
        r  r  )rx   rÔ   rZ   r  r^   r  r"   )rd   rp   rq   rµ   rÝ   s        re   rb   z+SearchCommands._parse_profile_resp3_unified7  s|   € ô �cœ4Ô Ø.�4×.Ñ.¨sÑ=°fÑ=Ð=à@˜t×@Ñ@ÀÑOÈÑOÑˆ�Ü�l¤DÔ)Ø˜Ñ$¨¸Ñ(Eà×;Ñ;¸LÓIˆLØÔ)¨,Ó7Ð7Ð7rg   c                 ó2   ‡‡‡— d„ Šdˆˆˆfd„	Š ‰| d¬«      S )a*  Convert a RESP3 profile dict into the RESP2 wire list shape.

        Pre-7.9.0 servers serialise the RESP2 profile as a list of
        ``[key, value]`` pairs at the top level, with nested structures
        as flat alternating key-value lists.  Post-7.9.0 servers serialise
        the top level itself as a flat ``[key, value, key, value]`` list
        (with ``"Shards"``/``"Coordinator"`` keys).  ``flat_top`` selects
        between these two top-level shapes; nested dicts always use the
        flat alternating form.

        Key structural difference: when a dict value is a list of dicts
        (e.g. ``"Child iterators": [{...}, {...}]``), RESP2 expands each
        dict as a separate sibling element in the parent flat list rather
        than keeping them nested inside a single value.
        c                 óT   — t        | t        «      xr | xr t        | d   t        «      S )Nr   )rx   rÔ   r^   )Úobjs    re   Ú_is_list_of_dictszESearchCommands._resp3_profile_dict_to_list.<locals>._is_list_of_dicts]  s$   € Ü˜c¤4Ó(ÒM¨SÒM´ZÀÀAÁÌÓ5MÐMrg   c                 ó8  •— t        | t        «      rÝ|rp‰	sng }| j                  «       D ]W  \  }}|g} ‰|«      r|D ]  }|j                   ‰|«      «       Œ n|j                   ‰|«      «       |j                  |«       ŒY |S g }| j                  «       D ]T  \  }}|j                  |«        ‰|«      r|D ]  }|j                   ‰|«      «       Œ Œ>|j                   ‰|«      «       ŒV |S t        | t        «      r| D �cg c]
  } ‰|«      ‘Œ c}S | S c c}w rw   )rx   r^   r   r€   rÔ   )
r  Ú	top_levelrµ   ræ   rç   Úentryr�   Ú_convertr  r  s
          €€€re   r  z<SearchCommands._resp3_profile_dict_to_list.<locals>._convert`  s  ø€ Ü˜#œtÔ$Ù¡XØ�FØ #§	¡	£ò -™˜˜1Ø!" ˜Ù,¨QÔ/Ø()ò = Ø %§¡©X°d«^Õ <ñ=ð "ŸL™L©°!«Ô5ØŸ™ eÕ,ð-ð "�Mà�FØ #§	¡	£ò 7™˜˜1ØŸ™ aÔ(Ù,¨QÔ/Ø()ò > Ø &§¡©h°t«nÕ =ñ>ð #ŸM™M©(°1«+Õ6ð7ð "�MÜ˜C¤Ô&Ø36Ö7¨4™ �Ò7Ð7ØˆJùò 8s   ÄDT)r  ©Fr¿   )rï   r  r  r  s    `@@re   r  z*SearchCommands._resp3_profile_dict_to_listK  s   ú€ ò$	N÷	ñ6 ˜¨Ô-Ð-rg   c                 ó|  — t        | t        «      rt        | «      S t        | t        «      rR| j	                  «       D ��ci c]6  \  }}t        |t        «      rt        |«      n|t
        j                  |«      “Œ8 c}}S t        | t        «      r#| D �cg c]  }t
        j                  |«      ‘Œ c}S | S c c}}w c c}w )z£Recursively convert bytes keys/values to strings in nested
        structures.  Non-bytes scalars (int, float, None, bool) pass
        through unchanged.
        )rx   rÜ   r   r^   r   r3   r  rÔ   )r  ræ   rç   r�   s       re   r  z#SearchCommands._to_string_recursive  s¦   € ô �cœ5Ô!Ü Ó$Ð$Ü�cœ4Ô ð
  ŸI™I›K÷	ñ �A�qô $.¨a´Ô#7”˜Q”¸QÜ"×7Ñ7¸Ó:ñ;óð ô �cœ4Ô ØJMÖNÀ$”N×7Ñ7¸Õ=ÒNÐNØˆ
ùóùò Os   ¿;B3ÂB9c                 ó$   — | j                  |«      S )z;Parse RESP3 FT.INFO response, normalising bytes to strings.©r  rœ   s      re   r`   z SearchCommands._parse_info_resp3’  s   € à×(Ñ(¨Ó-Ð-rg   c                 óÖ   — g }| j                  d«      xs g }| j                  «       D ]-  \  }}|dk(  rŒ|j                  |«       |j                  |«       Œ/ |j                  |«       |S )zƒConvert a RESP3-style attribute dict back into the RESP2 flat
        list (key-value pairs followed by bare flag tokens).
        rÍ   )rn   r   r€   Úextend)Ú	attr_dictr�   rÍ   ræ   rç   s        re   Ú_flatten_info_attributez&SearchCommands._flatten_info_attribute–  si   € ð
 ˆØ—‘˜gÓ&Ò,¨"ˆØ—O‘OÓ%ò 	‰DˆAˆqØ�GŠ|ØØ�K‰K˜ŒNØ�K‰K˜�Nð		ð
 	�‰�EÔØˆrg   c                 óÜ   — | j                  |«      }|j                  d«      }t        |t        «      r4|D �cg c]%  }t        |t        «      r| j                  |«      n|‘Œ' c}|d<   |S c c}w )zˆParse RESP3 FT.INFO into the legacy RESP2 flat shape so
        ``legacy_responses=True`` on a RESP3 wire matches RESP2 output.
        rÓ   )r  rn   rx   rÔ   r^   r$  )rd   rp   rq   rÕ   ÚattrsrÖ   s         re   rK   z*SearchCommands._parse_info_resp3_to_legacy¥  sr   € ð ×(Ñ(¨Ó-ˆØ—‘˜Ó&ˆÜ�eœTÔ"ð "ö"àô 7AÀÄtÔ6L�×,Ñ,¨TÔ2ÐRVÑVò"ˆD�Ñð ˆùò	"s   ·*A)c                 ó‚   — |si S |j                  «       D ��ci c]  \  }}t        |«      t        |«      “Œ c}}S c c}}w )zAParse RESP3 FT.CONFIG GET response, normalising bytes to strings.)r   r   )rd   rp   rq   ræ   rç   s        re   ra   z&SearchCommands._parse_config_get_resp3²  s5   € áØˆIØ=@¿Y¹Y»[×I±T°Q¸”˜Q“¤¨a£Ñ0ÓIÐIùÓIs   ˜;c                 ó    — |rt        |«      S i S )z>Parse RESP3 FT.CONFIG GET back to the RESP2 legacy dict shape.)r^   rœ   s      re   rQ   z0SearchCommands._parse_config_get_resp3_to_legacy¸  s   € áŒt�C‹yÐ' RÐ'rg   c                 ó,   — |si S | j                  |«      S )z>Parse RESP3 FT.SYNDUMP response, normalising bytes to strings.r   rœ   s      re   rR   z#SearchCommands._parse_syndump_resp3¼  s   € áØˆIØ×(Ñ(¨Ó-Ð-rg   c                 ó(   — | j                  | |¬«      S )zT
        Create a new batch indexer from the client with a given chunk size
        )Ú
chunk_size)ÚBatchIndexer)rd   r+  s     re   Úbatch_indexerzSearchCommands.batch_indexerÂ  s   € ð × Ñ  °*Ð Ó=Ð=rg   ÚfieldsÚno_term_offsetsÚno_field_flagsÚ	stopwordsÚ
definitionÚno_highlightÚno_term_frequenciesÚskip_initial_scanc                 ó6  — t         | j                  g}|�||j                  z  }|r|j                  t        «       |�6t        |t        «      r&|j                  t        «       |j                  |«       |r|j                  t        «       |r|j                  t        «       |r|j                  t        «       |	r|j                  t        «       |
r|j                  t        «       |�Kt        |t        t        t        f«      r0|t         t#        |«      gz  }t#        |«      dkD  r|t        |«      z  }|j                  d«       	 |t        t%        j&                  d„ |D «       Ž «      z  } | j,                  |Ž S # t(        $ r ||j+                  «       z  }Y Œ-w xY w)a«  
        Creates the search index. The index must not already exist.

        For more information, see https://redis.io/commands/ft.create/

        Args:
            fields: A list of Field objects.
            no_term_offsets: If `true`, term offsets will not be saved in the index.
            no_field_flags: If true, field flags that allow searching in specific fields
                            will not be saved.
            stopwords: If provided, the index will be created with this custom stopword
                       list. The list can be empty.
            definition: If provided, the index will be created with this custom index
                        definition.
            max_text_fields: If true, indexes will be encoded as if there were more than
                             32 text fields, allowing for additional fields beyond 32.
            temporary: Creates a lightweight temporary index which will expire after the
                       specified period of inactivity. The internal idle timer is reset
                       whenever the index is searched or added to.
            no_highlight: If true, disables highlighting support. Also implied by
                          `no_term_offsets`.
            no_term_frequencies: If true, term frequencies will not be saved in the
                                 index.
            skip_initial_scan: If true, the initial scan and indexing will be skipped.

        r   ÚSCHEMAc              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wrw   ©Ú
redis_args©Ú.0Úfs     re   ú	<genexpr>z.SearchCommands.create_index.<locals>.<genexpr>  ó   è ø€ Ò*J¸a¨1¯<©<¯>Ñ*Jùó   ‚)Ú
CREATE_CMDÚ
index_nameÚargsr€   r+   rx   rª   r,   r'   r)   r(   r*   r.   rÔ   Útupler›   r-   r¹   Ú	itertoolsÚchainÚ	TypeErrorr:  Úexecute_command)rd   r.  r/  r0  r1  r2  Úmax_text_fieldsÚ	temporaryr3  r4  r5  rC  s               re   Úcreate_indexzSearchCommands.create_indexÈ  sS  € ôN ˜DŸO™OÐ,ˆØÐ!Ø�J—O‘OÑ#ˆDÙØ�K‰KœÔ&ØÐ ¤Z°	¼3Ô%?Ø�K‰Kœ	Ô"Ø�K‰K˜	Ô"ÙØ�K‰Kœ	Ô"ÙØ�K‰KœÔÙØ�K‰KœÔ!ÙØ�K‰KœÔ ÙØ�K‰KœÔ(ØÐ ¤Z°	¼DÄ%ÌÐ;MÔ%NØ”Y¤ I£Ð/Ñ/ˆDÜ�9‹~ Ò!Øœ˜Y›Ñ'�à�‰�HÔð	(Ø”DœŸ™Ñ*JÀ6Ô*JÐKÓLÑLˆDð $ˆt×#Ñ# TÐ*Ð*øô ò 	(Ø�F×%Ñ%Ó'Ñ'ŠDð	(ús   Å%E9 Å9FÆFc                 óØ   — t         | j                  ddg}	 |t        t        j                  d„ |D «       Ž «      z  } | j                  |Ž S # t
        $ r ||j                  «       z  }Y Œ-w xY w)a  
        Alter the existing search index by adding new fields. The index
        must already exist.

        ### Parameters:

        - **fields**: a list of Field objects to add for the index

        For more information see `FT.ALTER <https://redis.io/commands/ft.alter>`_.
        r7  ÚADDc              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wrw   r9  r;  s     re   r>  z2SearchCommands.alter_schema_add.<locals>.<genexpr>  r?  r@  )Ú	ALTER_CMDrB  rÔ   rE  rF  rG  r:  rH  )rd   r.  rC  s      re   Úalter_schema_addzSearchCommands.alter_schema_add  sr   € ô ˜4Ÿ?™?¨H°eÐ<ˆð	(Ø”DœŸ™Ñ*JÀ6Ô*JÐKÓLÑLˆDð $ˆt×#Ñ# TÐ*Ð*øô ò 	(Ø�F×%Ñ%Ó'Ñ'ŠDð	(ús   –%A
 Á
A)Á(A)Údelete_documentsc                 óš   — t         | j                  g}t        |t        «      r|du rdnd}|r|j	                  |«        | j
                  |Ž S )ai  
        Drop the index if it exists.
        Replaced `drop_index` in RediSearch 2.0.
        Default behavior was changed to not delete the indexed documents.

        ### Parameters:

        - **delete_documents**: If `True`, all documents will be deleted.

        For more information see `FT.DROPINDEX <https://redis.io/commands/ft.dropindex>`_.
        TÚDDÚ )ÚDROPINDEX_CMDrB  rx   r  r€   rH  )rd   rQ  rC  Ú
delete_strs       re   Ú	dropindexzSearchCommands.dropindex"  sX   € ô ˜tŸ™Ð/ˆô Ð*¬DÔ1Ð6FÈ$Ñ6Nñ àð 	ñ Ø�K‰K˜
Ô#à#ˆt×#Ñ# TÐ*Ð*rg   c
                 óâ  — |s|	rd}t         | j                  ||g}|r|j                  d«       |�"|j                  d«       |j                  |«       |r7|j                  d«       |r|j                  d«       |	r|j                  d«       |r|d|gz  }|j                  d«       |t        t	        j
                  |
j                  «       Ž «      z  }|� |j                  |Ž S  | j                  |Ž S )	zS
        Internal add_document used for both batch and single doc indexing
        TÚNOSAVEÚPAYLOADÚREPLACEÚPARTIALÚNOCREATEÚLANGUAGEÚFIELDS)ÚADD_CMDrB  r€   rÔ   rE  rF  r   rH  )rd   Údoc_idÚconnÚnosaverˆ   r‰   ÚreplaceÚpartialÚlanguageÚ	no_creater.  rC  s               re   Ú_add_documentzSearchCommands._add_document;  sâ   € ñ" ‘iØˆGä˜Ÿ™¨&°%Ð8ˆÙØ�K‰K˜Ô!ØÐØ�K‰K˜	Ô"Ø�K‰K˜Ô ÙØ�K‰K˜	Ô"ÙØ—‘˜IÔ&ÙØ—‘˜JÔ'ÙØ�Z Ð*Ñ*ˆDØ�‰�HÔØ””Y—_‘_ f§l¡l£nÐ5Ó6Ñ6ˆàÐØ'�4×'Ñ'¨Ð.Ð.à#ˆt×#Ñ# TÐ*Ð*rg   c                 ó¢   — t         | j                  ||g}|r|j                  d«       |r|d|gz  }|� |j                  |Ž S  | j                  |Ž S )zX
        Internal add_document_hash used for both batch and single doc indexing
        r[  r^  )ÚADDHASH_CMDrB  r€   rH  )rd   ra  rb  rˆ   rf  rd  rC  s          re   Ú_add_document_hashz!SearchCommands._add_document_hashe  sc   € ô ˜TŸ_™_¨f°eÐ<ˆáØ�K‰K˜	Ô"áØ�Z Ð*Ñ*ˆDàÐØ'�4×'Ñ'¨Ð.Ð.à#ˆt×#Ñ# TÐ*Ð*rg   z2.0.0z2deprecated since redisearch 2.0, call hset instead©ÚversionÚreasonra  rc  rˆ   r‰   rd  re  rf  rg  c	                 ó:   —  | j                   |fd|||||||dœ|	¤ŽS )aš  
        Add a single document to the index.

        Args:

            doc_id: the id of the saved document.
            nosave: if set to true, we just index the document, and don't
                      save a copy of it. This means that searches will just
                      return ids.
            score: the document ranking, between 0.0 and 1.0
            payload: optional inner-index payload we can save for fast
                     access in scoring functions
            replace: if True, and the document already is in the index,
                     we perform an update and reindex the document
            partial: if True, the fields specified will be added to the
                       existing document.
                       This has the added benefit that any fields specified
                       with `no_index`
                       will not be reindexed again. Implies `replace`
            language: Specify the language used for document tokenization.
            no_create: if True, the document is only updated and reindexed
                         if it already exists.
                         If the document does not exist, an error will be
                         returned. Implies `replace`
            fields: kwargs dictionary of the document fields to be saved
                    and/or indexed.
                    NOTE: Geo points should be encoded as strings of "lon,lat"
        N)rb  rc  rˆ   r‰   rd  re  rf  rg  )rh  )
rd   ra  rc  rˆ   r‰   rd  re  rf  rg  r.  s
             re   Úadd_documentzSearchCommands.add_documenty  sD   € ðV "ˆt×!Ñ!Øð
àØØØØØØØñ
ð ñ
ð 	
rg   c                 ó.   — | j                  |d|||¬«      S )aþ  
        Add a hash document to the index.

        ### Parameters

        - **doc_id**: the document's id. This has to be an existing HASH key
                      in Redis that will hold the fields the index needs.
        - **score**:  the document ranking, between 0.0 and 1.0
        - **replace**: if True, and the document already is in the index, we
                      perform an update and reindex the document
        - **language**: Specify the language used for document tokenization.
        N)rb  rˆ   rf  rd  )rk  )rd   ra  rˆ   rf  rd  s        re   Úadd_document_hashz SearchCommands.add_document_hash±  s'   € ð  ×&Ñ&Ø˜ U°XÀwð 'ó 
ð 	
rg   zdeprecated since redisearch 2.0c                 óŽ   — t         | j                  |g}|r|j                  d«       |� |j                  |Ž S  | j                  |Ž S )a  
        Delete a document from index
        Returns 1 if the document was deleted, 0 if not

        ### Parameters

        - **delete_actual_document**: if set to True, RediSearch also delete
                                      the actual document if it is in the index
        rS  )ÚDEL_CMDrB  r€   rH  )rd   ra  rb  Údelete_actual_documentrC  s        re   Údelete_documentzSearchCommands.delete_documentÅ  sO   € ô ˜Ÿ™¨&Ð1ˆÙ!Ø�K‰K˜ÔàÐØ'�4×'Ñ'¨Ð.Ð.à#ˆt×#Ñ# TÐ*Ð*rg   r¡   c                 ó  — | j                   j                  |«      }|j                  «       D ��ci c]%  \  }}t        |«      t	        |t        |«      |«      “Œ' }}}	 |d= t        dd|i|¤ŽS c c}}w # t
        $ r Y Œw xY w)úÿ
        Load a single document by id

        - **field_encodings**: optional dict mapping field names to encodings.
          If a field's encoding is ``None`` the raw bytes value is preserved
          (useful for binary data such as vectors).
        r‡   r¿   ©rm   Úhgetallr   r   r   ÚKeyErrorr   ©rd   r‡   r¡   r.  ræ   rç   s         re   Úload_documentzSearchCommands.load_documentÙ  s’   € ð —‘×$Ñ$ RÓ(ˆð Ÿ™›÷
á��1ô ˜‹OÔ/°´<À³?ÀOÓTÑTð
ˆñ 
ð
	Ø�t�ô Ñ(˜2Ð( Ñ(Ð(ùó
øô ò 	Ùð	ús   ¯*A-ÁA3 Á3	A?Á>A?c                 óF   —  | j                   t        | j                  g|¢­Ž S )z�
        Returns the full contents of multiple documents.

        ### Parameters

        - **ids**: the ids of the saved documents.

        )rH  ÚMGET_CMDrB  )rd   Úidss     re   rn   zSearchCommands.getî  s"   € ð $ˆt×#Ñ#¤H¨d¯o©oÐDÀÒDÐDrg   c                 ón   — | j                  t        | j                  «      }| j                  t        |«      S )úÕ
        Get info an stats about the the current index, including the number of
        documents, memory consumption, etc

        For more information see `FT.INFO <https://redis.io/commands/ft.info>`_.
        ©rH  r5   rB  ru   ©rd   rp   s     re   rÕ   zSearchCommands.infoû  s-   € ð ×"Ñ"¤8¨T¯_©_Ó=ˆØ×"Ñ"¤8¨SÓ1Ð1rg   Úquery_paramsc                 óþ   — |€g S g }t        |«      dkD  rh|j                  d«       |j                  t        |«      dz  «       |j                  «       D ]'  \  }}|j                  |«       |j                  |«       Œ) |S )Nr   ÚPARAMSr   )r¹   r€   r   )rd   r…  rC  r{   r‚   s        re   Úget_params_argszSearchCommands.get_params_args  s~   € ð ÐØˆIØˆÜˆ|Ó˜qÒ Ø�K‰K˜Ô!Ø�K‰Kœ˜LÓ)¨AÑ-Ô.Ø*×0Ñ0Ó2ò #‘
��UØ—‘˜CÔ Ø—‘˜EÕ"ð#ð ˆrg   c                 óö   — | j                   g}t        |t        «      rt        |«      }t        |t        «      st	        dt        |«      › �«      ‚||j                  «       z  }|| j                  |«      z  }||fS )NzBad query type )rB  rx   rÛ   r#   Ú
ValueErrorrÆ   Úget_argsrˆ  )rd   ri   r…  rC  s       re   Ú_mk_query_argszSearchCommands._mk_query_args  ss   € ð —‘Ð ˆä�eœSÔ!ä˜%“LˆEÜ˜%¤Ô'Ü˜¬t°E«{¨mÐ<Ó=Ð=à�—‘Ó Ñ ˆØ�×$Ñ$ \Ó2Ñ2ˆà�Uˆ{Ðrg   ri   c                 óT  — | j                  ||¬«      \  }}t        j                  «       }t        di}t	        | t
        «      r
||d<   d|d<    | j                  t        g|¢­i |¤Ž}t	        |t
        «      r|S | j                  t        ||t        j                  «       |z
  dz  ¬«      S )á¦  
        Search the index for a given query, and return a result of documents

        ### Parameters

        - **query**: the search query. Either a text for simple queries with
                     default parameters, or a Query object for complex queries.
                     See RediSearch's documentation on query format

        For more information see `FT.SEARCH <https://redis.io/commands/ft.search>`_.
        ©r…  Tri   r   rž   ç     @�@©ri   rž   ©	rŒ  ÚtimeÚ	monotonicr
   rx   r   rH  r7   ru   ©rd   ri   r…  rC  ÚstÚoptionsrp   s          re   ÚsearchzSearchCommands.search$  s°   € ð  ×)Ñ)¨%¸lÐ)ÓK‰ˆˆeÜ�^‰^Óˆô
   Ð&ˆÜ�dœHÔ%Ø$ˆG�GÑØ"#ˆG�JÑà"ˆd×"Ñ"¤:Ð@°Ò@¸Ñ@ˆä�cœ8Ô$ØˆJà×"Ñ"Ü˜ 5´D·N±NÓ4DÀrÑ4IÈVÑ3Sð #ó 
ð 	
rg   Úcombine_methodrö   Úparams_substitutionÚtimeoutr‘   Úreturnc                 óH  — | j                   }i }t        |g}	|	j                  |j                  «       «       |r|	j                  |j                  «       «       |r$|	j                  |j	                  «       «       ||d<   |r |	j                  | j                  |«      «       |r|	j                  d|f«       |r$d|d<   |	j                  |j	                  «       «       d|t        <   ||d<    | j                  |	i |¤Ž}
t        |
t        «      r|
S  | j                  t        |
fi |¤ŽS )áM  
        Execute a hybrid search using both text and vector queries

        Args:
            - **query**: HybridQuery object
                        Contains the text and vector queries
            - **combine_method**: CombineResultsMethod object
                        Contains the combine method and parameters
            - **post_processing**: HybridPostProcessingConfig object
                        Contains the post processing configuration
            - **params_substitution**: Dict[str, Union[str, int, float, bytes]]
                        Contains the parameters substitution
            - **timeout**: int - contains the timeout in milliseconds
            - **cursor**: HybridCursorQuery object - contains the cursor configuration


        For more information see `FT.SEARCH <https://redis.io/commands/ft.hybrid>`.
        rö   ÚTIMEOUTTr‘   ri   ©rB  r9   r"  r‹  Ú
build_argsrˆ  r
   rH  rx   r   ru   ©rd   ri   r™  rö   rš  r›  r‘   Úindexr—  Úpiecesrp   s              re   Úhybrid_searchzSearchCommands.hybrid_searchH  s  € ð8 —‘ˆØˆÜ˜eÐ$ˆØ�‰�e—n‘nÓ&Ô'ÙØ�M‰M˜.×1Ñ1Ó3Ô4ÙØ�M‰M˜/×4Ñ4Ó6Ô7Ø)8ˆGÐ%Ñ&ÙØ�M‰M˜$×.Ñ.Ð/BÓCÔDÙØ�M‰M˜9 gÐ.Ô/ÙØ $ˆG�HÑØ�M‰M˜&×+Ñ+Ó-Ô.ð
 !%ˆ”ÑØ ˆ�Ñà"ˆd×"Ñ" FÐ6¨gÑ6ˆä�cœ8Ô$ØˆJà"ˆt×"Ñ"¤:¨sÑ>°gÑ>Ð>rg   c                 ó\   — | j                  ||¬«      \  }} | j                  t        g|¢­Ž S )z�Returns the execution plan for a complex query.

        For more information see `FT.EXPLAIN <https://redis.io/commands/ft.explain>`_.
        r�  )rŒ  rH  ÚEXPLAIN_CMD)rd   ri   r…  rC  Ú
query_texts        re   ÚexplainzSearchCommands.explain‚  s6   € ð  ×.Ñ.¨uÀ<Ð.ÓPÑˆˆjØ#ˆt×#Ñ#¤KÐ7°$Ò7Ð7rg   c                 ó   — t        d«      ‚)Nz#EXPLAINCLI will not be implemented.)ÚNotImplementedError)rd   ri   s     re   Úexplain_clizSearchCommands.explain_cliŽ  s   € Ü!Ð"GÓHÐHrg   c                 ó’  — t        |t        «      r9t        |j                  «      }t        | j
                  g|j                  «       z   }nCt        |t        «      r'd}t        d| j
                  g|j                  «       z   }nt        d|«      ‚|| j                  |«      z  } | j                  |Ž }| j                  t        |||¬«      S )á‰  
        Issue an aggregation query.

        ### Parameters

        **query**: This can be either an `AggregateRequest`, or a `Cursor`

        An `AggregateResult` object is returned. You can access the rows from
        its `rows` property, which will always yield the rows of the result.

        For more information see `FT.AGGREGATE <https://redis.io/commands/ft.aggregate>`_.
        TÚREADú	Bad queryr
  ©rx   r   r  r´   r;   rB  r¡  r   Ú
CURSOR_CMDrŠ  rˆ  rH  ru   ©rd   ri   r…  r°   ro   Úraws         re   Ú	aggregatezSearchCommands.aggregate‘  s»   € ô" �eÔ-Ô.Ü˜eŸm™mÓ,ˆJÜ  $§/¡/Ð2°U×5EÑ5EÓ5GÑG‰CÜ˜œvÔ&ØˆJÜ˜v t§¡Ð7¸%×:JÑ:JÓ:LÑL‰Cä˜[¨%Ó0Ð0Øˆt×#Ñ# LÓ1Ñ1ˆà"ˆd×"Ñ" CÐ(ˆØ×"Ñ"Ü˜3 e¸
ð #ó 
ð 	
rg   r´  r°   c                 óâ   — |r1t        |t        «      r|d   |_        |}nt        |d   «      }|d   }nd }t        |t        «      r|j                  r|d   }|dd  }nd }|dd  }t        |||«      S )Nr   r   r   )rx   r   rí   r   Ú_with_schemar   )rd   r´  ri   r°   r‘   Úschemarð   s          re   r±   z$SearchCommands._get_aggregate_result±  s‚   € ñ Ü˜%¤Ô(Ø ™F�”	Ø‘ä  A¡›�Ø�a‘&‰CàˆFä�eÔ-Ô.°5×3EÒ3EØ˜‘VˆFØ�q�r�7‰DàˆFØ�q�r�7ˆDä˜t V¨VÓ4Ð4rg   Úlimitedc                 óú  — t        j                  «       }t        | j                  dg}|r|j	                  d«       |j	                  d«       t        |t        «      rd|d<   ||j                  «       z  }nHt        |t        «      r-d|d<   ||j                  «       z  }|| j                  |«      z  }nt        d«      ‚ | j                  |Ž }| j                  t        ||t        j                  «       |z
  dz  ¬	«      S )
a  
        Performs a search or aggregate command and collects performance
        information.

        ### Parameters

        **query**: This can be either an `AggregateRequest` or `Query`.
        **limited**: If set to True, removes details of reader iterator.
        **query_params**: Define one or more value parameters.
        Each parameter has a name and a value.

        rT  ÚLIMITEDÚQUERYÚ	AGGREGATEr   r’   z5Must provide AggregateRequest object or Query object.r�  r‘  )r“  r”  r=   rB  r€   rx   r   r¡  r#   r‹  rˆ  rŠ  rH  ru   )rd   ri   r¹  r…  r–  ro   rp   s          re   r	  zSearchCommands.profileÇ  së   € ô* �^‰^ÓˆÜ˜DŸO™O¨RÐ0ˆÙØ�J‰J�yÔ!Ø�
‰
�7Ôä�eÔ-Ô.Ø ˆC�‰FØ�5×#Ñ#Ó%Ñ%‰CÜ˜œuÔ%ØˆC�‰FØ�5—>‘>Ó#Ñ#ˆCØ�4×'Ñ'¨Ó5Ñ5‰CäÐTÓUÐUà"ˆd×"Ñ" CÐ(ˆà×"Ñ"Ü˜ E´T·^±^Ó5EÈÑ5JÈfÑ4Tð #ó 
ð 	
rg   c                 óô   — t         | j                  |g}|r|j                  d|g«       |r|j                  dd|g«       |r|j                  dd|g«        | j                  |Ž }| j	                  t         |«      S )a´  
        Issue a spellcheck query

        Args:

            query: search query.
            distance: the maximal Levenshtein distance for spelling
                       suggestions (default: 1, max: 4).
            include: specifies an inclusion custom dictionary.
            exclude: specifies an exclusion custom dictionary.

        For more information see `FT.SPELLCHECK <https://redis.io/commands/ft.spellcheck>`_.
        ÚDISTANCEÚTERMSÚINCLUDEÚEXCLUDE©r?   rB  r"  rH  ru   ©rd   ri   ÚdistanceÚincludeÚexcludero   rp   s          re   Ú
spellcheckzSearchCommands.spellcheckò  sy   € ô ˜tŸ™°Ð6ˆÙØ�J‰J˜
 HÐ-Ô.áØ�J‰J˜ ¨GÐ4Ô5áØ�J‰J˜ ¨GÐ4Ô5à"ˆd×"Ñ" CÐ(ˆà×"Ñ"¤>°3Ó7Ð7rg   ÚnameÚtermsc                 óR   — t         |g}|j                  |«        | j                  |Ž S )zûAdds terms to a dictionary.

        ### Parameters

        - **name**: Dictionary name.
        - **terms**: List of items for adding to the dictionary.

        For more information see `FT.DICTADD <https://redis.io/commands/ft.dictadd>`_.
        )ÚDICT_ADD_CMDr"  rH  ©rd   rÉ  rÊ  ro   s       re   Údict_addzSearchCommands.dict_add  ó-   € ô ˜TÐ"ˆØ�
‰
�5ÔØ#ˆt×#Ñ# SÐ)Ð)rg   c                 óR   — t         |g}|j                  |«        | j                  |Ž S )a  Deletes terms from a dictionary.

        ### Parameters

        - **name**: Dictionary name.
        - **terms**: List of items for removing from the dictionary.

        For more information see `FT.DICTDEL <https://redis.io/commands/ft.dictdel>`_.
        )ÚDICT_DEL_CMDr"  rH  rÍ  s       re   Údict_delzSearchCommands.dict_del  rÏ  rg   c                 ó0   — t         |g} | j                  |Ž S )zÉDumps all terms in the given dictionary.

        ### Parameters

        - **name**: Dictionary name.

        For more information see `FT.DICTDUMP <https://redis.io/commands/ft.dictdump>`_.
        )ÚDICT_DUMP_CMDrH  )rd   rÉ  ro   s      re   Ú	dict_dumpzSearchCommands.dict_dump*  s!   € ô ˜dÐ#ˆØ#ˆt×#Ñ# SÐ)Ð)rg   ú8.0.0úDdeprecated since Redis 8.0, call config_set from core module insteadÚoptionr‚   c                 ó>   — t         d||g} | j                  |Ž }|dk(  S )á  Set runtime configuration option.

        ### Parameters

        - **option**: the name of the configuration option.
        - **value**: a value for the configuration option.

        For more information see `FT.CONFIG SET <https://redis.io/commands/ft.config-set>`_.
        ÚSETÚOK©rA   rH  ©rd   rØ  r‚   ro   r´  s        re   Ú
config_setzSearchCommands.config_set6  s.   € ô ˜5 &¨%Ð0ˆØ"ˆd×"Ñ" CÐ(ˆØ�d‰{Ðrg   úDdeprecated since Redis 8.0, call config_get from core module insteadc                 ó^   — t         d|g} | j                  |Ž }| j                  t         |«      S )úãGet runtime configuration option value.

        ### Parameters

        - **option**: the name of the configuration option.

        For more information see `FT.CONFIG GET <https://redis.io/commands/ft.config-get>`_.
        ÚGET©rA   rH  ru   ©rd   rØ  ro   rp   s       re   Ú
config_getzSearchCommands.config_getH  s5   € ô ˜5 &Ð)ˆØ"ˆd×"Ñ" CÐ(ˆØ×"Ñ"¤:¨sÓ3Ð3rg   Útagfieldc                 óD   — | j                  t        | j                  |«      S )zÒ
        Return a list of all possible tag values

        ### Parameters

        - **tagfield**: Tag field name

        For more information see `FT.TAGVALS <https://redis.io/commands/ft.tagvals>`_.
        )rH  ÚTAGVALS_CMDrB  )rd   rç  s     re   ÚtagvalszSearchCommands.tagvalsY  s   € ð ×#Ñ#¤K°·±À(ÓKÐKrg   Úaliasc                 óD   — | j                  t        || j                  «      S )zî
        Alias a search index - will fail if alias already exists

        ### Parameters

        - **alias**: Name of the alias to create

        For more information see `FT.ALIASADD <https://redis.io/commands/ft.aliasadd>`_.
        )rH  ÚALIAS_ADD_CMDrB  ©rd   rë  s     re   ÚaliasaddzSearchCommands.aliasaddf  s   € ð ×#Ñ#¤M°5¸$¿/¹/ÓJÐJrg   c                 óD   — | j                  t        || j                  «      S )zø
        Updates an alias - will fail if alias does not already exist

        ### Parameters

        - **alias**: Name of the alias to create

        For more information see `FT.ALIASUPDATE <https://redis.io/commands/ft.aliasupdate>`_.
        )rH  ÚALIAS_UPDATE_CMDrB  rî  s     re   ÚaliasupdatezSearchCommands.aliasupdates  s   € ð ×#Ñ#Ô$4°e¸T¿_¹_ÓMÐMrg   c                 ó.   — | j                  t        |«      S )zØ
        Removes an alias to a search index

        ### Parameters

        - **alias**: Name of the alias to delete

        For more information see `FT.ALIASDEL <https://redis.io/commands/ft.aliasdel>`_.
        )rH  ÚALIAS_DEL_CMDrî  s     re   ÚaliasdelzSearchCommands.aliasdel€  s   € ð ×#Ñ#¤M°5Ó9Ð9rg   c                 ó’   — | j                  t        | j                  «      }t        |t        «      r|S | j                  t        |«      S )áï  
        List all aliases associated with the current index as an unordered set.

        The index must be the name of an index created with ``FT.CREATE``; an
        alias name is not accepted as a substitute. Returns an empty set when
        the index exists but has no aliases. Alias names honor
        ``decode_responses`` (``str`` when decoding is enabled, ``bytes``
        otherwise).

        For more information see `FT.ALIASLIST <https://redis.io/commands/ft.aliaslist>`_.
        ©rH  rE   rB  rx   r   ru   r„  s     re   Ú	aliaslistzSearchCommands.aliaslistŒ  s<   € ð ×"Ñ"¤>°4·?±?ÓCˆÜ�cœ8Ô$ØˆJØ×"Ñ"¤>°3Ó7Ð7rg   c                 óh  — | j                  d¬«      }|D ]‰  }t        ||j                  |j                  g}|j	                  d«      r|j                  d«       |j                  r,|j                  d«       |j                  |j                  «        |j                  |Ž  Œ‹ |j                  «       d   S )aJ  
        Add suggestion terms to the AutoCompleter engine. Each suggestion has
        a score and string.
        If kwargs["increment"] is true and the terms are already in the
        server's dictionary, we increment their scores.

        For more information see `FT.SUGADD <https://redis.io/commands/ft.sugadd/>`_.
        F©ÚtransactionÚ	incrementÚINCRrZ  éÿÿÿÿ©	ÚpipelineÚSUGADD_COMMANDÚstringrˆ   rn   r€   r‰   rH  Úexecute©rd   r{   r  rq   ÚpipeÚsugrC  s          re   ÚsugaddzSearchCommands.sugadd�  s—   € ð �}‰}¨ˆ}Ó/ˆØò 	(ˆCÜ" C¨¯©°S·Y±YÐ?ˆDØ�z‰z˜+Ô&Ø—‘˜FÔ#Ø�{Š{Ø—‘˜IÔ&Ø—‘˜CŸK™KÔ(à ˆD× Ñ  $Ò'ð	(ð �|‰|‹~˜bÑ!Ð!rg   r{   c                 ó.   — | j                  t        |«      S )z 
        Return the number of entries in the AutoCompleter index.

        For more information see `FT.SUGLEN <https://redis.io/commands/ft.suglen>`_.
        )rH  ÚSUGLEN_COMMAND)rd   r{   s     re   ÚsuglenzSearchCommands.suglen´  s   € ð ×#Ñ#¤N°CÓ8Ð8rg   r  c                 ó0   — | j                  t        ||«      S )zÙ
        Delete a string from the AutoCompleter index.
        Returns 1 if the string was found and deleted, 0 otherwise.

        For more information see `FT.SUGDEL <https://redis.io/commands/ft.sugdel>`_.
        )rH  ÚSUGDEL_COMMAND)rd   r{   r  s      re   ÚsugdelzSearchCommands.sugdel¼  s   € ð ×#Ñ#¤N°C¸Ó@Ð@rg   ÚprefixÚfuzzyÚnumr    Úwith_payloadsc                 ó  — t         ||d|g}|r|j                  t        «       |r|j                  t        «       |r|j                  t        «        | j
                  |Ž }g }	|s|	S t        |||«      }
|
D �cg c]  }|‘Œ c}S c c}w )át  
        Get a list of suggestions from the AutoCompleter, for a given prefix.

        Parameters:

        prefix : str
            The prefix we are searching. **Must be valid ascii or utf-8**
        fuzzy : bool
            If set to true, the prefix search is done in fuzzy mode.
            **NOTE**: Running fuzzy searches on short (<3 letters) prefixes
            can be very
            slow, and even scan the entire index.
        with_scores : bool
            If set to true, we also return the (refactored) score of
            each suggestion.
            This is normally not needed, and is NOT the original score
            inserted into the index.
        with_payloads : bool
            Return suggestion payloads
        num : int
            The maximum number of results we return. Note that we might
            return less. The algorithm trims irrelevant suggestions.

        Returns:

        list:
             A list of Suggestion objects. If with_scores was False, the
             score of all suggestions is 1.

        For more information see `FT.SUGGET <https://redis.io/commands/ft.sugget>`_.
        ÚMAX©ÚSUGGET_COMMANDr€   r0   r/   r1   rH  r%   )rd   r{   r  r  r  r    r  rC  rp   r†   Úparserrà   s               re   ÚsuggetzSearchCommands.suggetÅ  sƒ   € ôP   V¨U°CÐ8ˆÙØ�K‰KœÔÙØ�K‰Kœ
Ô#ÙØ�K‰KœÔ%à"ˆd×"Ñ" DÐ)ˆØˆÙØˆNä! +¨}¸cÓBˆØ!Ö"�a’Ò"Ð"ùÒ"s   Á7	BÚgroupidÚskipinitialc                 ó�   — t         | j                  |g}|r|j                  dg«       |j                  |«        | j                  |Ž S )að  
        Updates a synonym group.
        The command is used to create or update a synonym group with
        additional terms.
        Only documents which were indexed after the update will be affected.

        Parameters:

        groupid :
            Synonym group id.
        skipinitial : bool
            If set to true, we do not scan and index.
        terms :
            The terms.

        For more information see `FT.SYNUPDATE <https://redis.io/commands/ft.synupdate>`_.
        r.   )ÚSYNUPDATE_CMDrB  r"  rH  )rd   r  r  rÊ  ro   s        re   Ú	synupdatezSearchCommands.synupdateý  sF   € ô$ ˜dŸo™o¨wÐ7ˆÙØ�J‰JÐ)Ð*Ô+Ø�
‰
�5ÔØ#ˆt×#Ñ# SÐ)Ð)rg   c                 ón   — | j                  t        | j                  «      }| j                  t        |«      S )a  
        Dumps the contents of a synonym group.

        The command is used to dump the synonyms data structure.
        Returns a list of synonym terms and their synonym group ids.

        For more information see `FT.SYNDUMP <https://redis.io/commands/ft.syndump>`_.
        )rH  rC   rB  ru   r„  s     re   ÚsyndumpzSearchCommands.syndump  s-   € ð ×"Ñ"¤;°·±Ó@ˆØ×"Ñ"¤;°Ó4Ð4rg   rw   r  )éd   )	FFNNFNFFF)NFç      ð?NFFNF)Nr"  NF)Fr"  NFFNF)r"  NF)NF©NNNNN)FN©NNN©Fé
   FF){Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	frozensetr7   r;   r²  r9   r=   rl   rf   ru   Ústaticmethodr}   rƒ   rT   rU   r6   rF   r8   r:   r<   r>   r@   rB   rD   rÎ   rÑ   rX   rY   rZ   r[   r\   rL   rH   rN   rM   rc   rØ   rÙ   rI   rP   r  rO   rb   r  r  r`   r$  rK   ra   rQ   rR   r-  r   r    r  r   rÛ   r!   rK  r   rP  rW  rh  rk  r   r«   rp  rr  rv  r   r   r}  rn   rÕ   rª   rÜ   rˆ  rŒ  r#   r˜  r   r   r   r   r   r   r   r   r¥  r©  r¬  r   r   rµ  r±   rD  r$   r   r"   r	  rÈ  rÎ  rÒ  rÕ  rß  ræ  rê  r   rï  rò  rõ  r   rù  r  r  r  r%   r  r  r   r¿   rg   re   r3   r3   T   s´  „ Ùñ %Ø	�] J°
¸KÐHóÐò[
òz!ð. òDó ðDð
 ñó ðòò*
ò2!ò*ò
ò
ò,Vò2ò#òJ>òCñ %ÚNóÐð ñó ðò.ò
ò68ò<Kò

ò
ò%òN+Sò^
ò:&
ðP ñ!ó ð!ð ñ?ó ð?ò
ò2$òP/$òb8ò88ð( ò/.ó ð/.ðf ñó ðò$.ð ñó ðòòJò(ò.ó>ð !&Ø$Ø)-Ø04ØØØ"Ø$)Ø"'ñD+à�U‘ðD+ð ðD+ð ð	D+ð
 ˜D ™IÑ&ðD+ð ˜_Ñ-ðD+ð ðD+ð "ðD+ð  óD+ðL+ u¨U°D¸±KÐ-?Ñ'@ó +ñ(+¨$ó +ð8 ØØØØØØØó(+ðV DIó+ñ( ØÐ Tôð ØØ"&ØØØ"&Øñ3
àð3
ð ð3
ð ð	3
ð
 ˜$‘ð3
ð ð3
ð ð3
ð ˜3‘-ð3
ð ð3
ð �s‘)ò3
óð3
ñj ØÐ Tôò
óð
ñ"  Ð1RÔSò+ó Tð+ñ&)°¸$¸sÀC¸x¹.Ñ1Ió )ñ*  Ð1RÔSñ
Eó Tð
Eò	2ðØ$ T¨#¨u°S¸#¸uÀeÐ5KÑ/LÐ*LÑ%MÑNóðØ#+¨D°°e¸CÀÀeÈUÐ<RÑ6SÐ1SÑ,TÑ#Uóð& OSñ"
à�S˜%�ZÑ ð"
ð ˜D  e¨C°°e¸UÐ,BÑ&CÐ!CÑDÀdÐJÑKó"
ñH Óð :>Ø@DØRVØ!%Ø.2ñ7?àð7?ð !Ð!5Ñ6ð7?ð "Ð"<Ñ=ð	7?ð
 & d¨3°°c¸3ÀÀuÐ6LÑ0MÐ+MÑ&NÑOð7?ð ˜#‘ð7?ð Ð*Ñ+ð7?ð 
ˆ|Ð/°Ð9Ñ	:ò7?ó ð7?ðx LPñ
8à�S˜%�ZÑ ð
8ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHó
8ðI  s¨E zÑ!2ó Ið LPñ
àÐ% vÐ-Ñ.ð
ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHó
ð@5Øð5Ø %Ð&6¸Ð&>Ñ ?ð5ØMQó5ð2 ØKOñ	)
à�UÐ,Ð,Ñ-ð)
ð ð)
ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHð	)
ð
 
Øˆe�F˜OÐ+Ñ,Ð.@Ð@ÑAØð	ñ
ó)
óV8ð8*˜Sð *¨$¨s©)ó *ð*˜Sð *¨$¨s©)ó *ð
*˜có 
*ñ ØØUôð ð ¨Sð °Tò ó	ðñ ØØUôð4 ð 4¨ò 4ó	ð4ðL ó LðK˜dó KðN ó Nð
:˜dó 
:ð8˜3˜s U™{Ñ+ó 8ò""ð.9˜#ð 9 #ó 9ðA˜#ð A sð A¨só Að ØØ!Ø#ñ6#àð6#ð ð6#ð ð	6#ð
 ð6#ð ð6#ð ð6#ð 
ÐÑ	ó6#ñp* ð *°4ð *ÈÈcÉó *ó0
5rg   r3   c                   óà  — e Zd Zd„ Zdeeez     fd„Z	 d"deee	f   de
eeeeeeef   f      fd„Z e«       	 	 	 	 	 d#dede
e   d	e
e   d
e
eeeeeeef   f      de
e   de
e   deeeef   fd„«       Z	 d"deeef   de
eeeeeeef   f      fd„Zd$d„Z edd¬«      dededefd„«       Z edd¬«      dedefd„«       Zd"de
eee f      fd„Z!d„ Z"	 	 	 	 d%dededededed ede#e$   fd!„Z%y)&ÚAsyncSearchCommandsc              ƒ   óŠ   K  — | j                  t        | j                  «      ƒ d{  –—† }| j                  t        |«      S 7 Œ­w)r‚  Nrƒ  r„  s     re   rÕ   zAsyncSearchCommands.info#  s:   è ø€ ð ×(Ñ(¬°4·?±?ÓC×CˆØ×"Ñ"¤8¨SÓ1Ð1ð Dús   ‚$A¦A§Arœ  c              ƒ   ó®   K  — | j                  t        | j                  «      ƒ d{  –—† }t        |t        «      r|S | j                  t        |«      S 7 Œ,­w)r÷  Nrø  r„  s     re   rù  zAsyncSearchCommands.aliaslist.  sI   è ø€ ð ×(Ñ(¬¸¿¹ÓI×IˆÜ�cœ8Ô$ØˆJØ×"Ñ"¤>°3Ó7Ð7ð Jús   ‚$A¦A§-ANri   r…  c              ƒ   óp  K  — | j                  ||¬«      \  }}t        j                  «       }t        di}t	        | t
        «      r
||d<   d|d<    | j                  t        g|¢­i |¤Žƒ d{  –—† }t	        |t
        «      r|S | j                  t        ||t        j                  «       |z
  dz  ¬«      S 7 ŒG­w)	rŽ  r�  Tri   r   rž   Nr�  r‘  r’  r•  s          re   r˜  zAsyncSearchCommands.search?  s½   è ø€ ð  ×)Ñ)¨%¸lÐ)ÓK‰ˆˆeÜ�^‰^Óˆô
   Ð&ˆÜ�dœHÔ%Ø$ˆG�GÑØ"#ˆG�JÑà(�D×(Ñ(¬ÐF°dÒF¸gÑF×Fˆä�cœ8Ô$ØˆJà×"Ñ"Ü˜ 5´D·N±NÓ4DÀrÑ4IÈVÑ3Sð #ó 
ð 	
ð Gús   ‚A*B6Á,B4Á-AB6r™  rö   rš  r›  r‘   c              ƒ   ód  K  — | j                   }i }t        |g}	|	j                  |j                  «       «       |r|	j                  |j                  «       «       |r$|	j                  |j	                  «       «       ||d<   |r |	j                  | j                  |«      «       |r|	j                  d|f«       |r$d|d<   |	j                  |j	                  «       «       d|t        <   ||d<    | j                  |	i |¤Žƒ d{  –—† }
t        |
t        «      r|
S  | j                  t        |
fi |¤ŽS 7 Œ.­w)rž  rö   rŸ  Tr‘   ri   Nr   r¢  s              re   r¥  z!AsyncSearchCommands.hybrid_searchc  s  è ø€ ð8 —‘ˆØˆÜ˜eÐ$ˆØ�‰�e—n‘nÓ&Ô'ÙØ�M‰M˜.×1Ñ1Ó3Ô4ÙØ�M‰M˜/×4Ñ4Ó6Ô7Ø)8ˆGÐ%Ñ&ÙØ�M‰M˜$×.Ñ.Ð/BÓCÔDÙØ�M‰M˜9 gÐ.Ô/ÙØ $ˆG�HÑØ�M‰M˜&×+Ñ+Ó-Ô.ð
 !%ˆ”ÑØ ˆ�Ñà(�D×(Ñ(¨&Ð<°GÑ<×<ˆä�cœ8Ô$ØˆJà"ˆt×"Ñ"¤:¨sÑ>°gÑ>Ð>ð =ús   ‚C=D0Ã?D.Ä /D0c              ƒ   ó®  K  — t        |t        «      r9t        |j                  «      }t        | j
                  g|j                  «       z   }nCt        |t        «      r'd}t        d| j
                  g|j                  «       z   }nt        d|«      ‚|| j                  |«      z  } | j                  |Ž ƒ d{  –—† }| j                  t        |||¬«      S 7 Œ­w)r®  Tr¯  r°  Nr
  r±  r³  s         re   rµ  zAsyncSearchCommands.aggregate�  sÇ   è ø€ ô" �eÔ-Ô.Ü˜eŸm™mÓ,ˆJÜ  $§/¡/Ð2°U×5EÑ5EÓ5GÑG‰CÜ˜œvÔ&ØˆJÜ˜v t§¡Ð7¸%×:JÑ:JÓ:LÑL‰Cä˜[¨%Ó0Ð0Øˆt×#Ñ# LÓ1Ñ1ˆà(�D×(Ñ(¨#Ð.×.ˆØ×"Ñ"Ü˜3 e¸
ð #ó 
ð 	
ð /ús   ‚B3CÂ5CÂ6Cc              ƒ   ó  K  — t         | j                  |g}|r|j                  d|g«       |r|j                  dd|g«       |r|j                  dd|g«        | j                  |Ž ƒ d{  –—† }| j	                  t         |«      S 7 Œ­w)a¾  
        Issue a spellcheck query

        ### Parameters

        **query**: search query.
        **distance***: the maximal Levenshtein distance for spelling
                       suggestions (default: 1, max: 4).
        **include**: specifies an inclusion custom dictionary.
        **exclude**: specifies an exclusion custom dictionary.

        For more information see `FT.SPELLCHECK <https://redis.io/commands/ft.spellcheck>`_.
        r¿  rÀ  rÁ  rÂ  NrÃ  rÄ  s          re   rÈ  zAsyncSearchCommands.spellcheck½  s…   è ø€ ô ˜tŸ™°Ð6ˆÙØ�J‰J˜
 HÐ-Ô.áØ�J‰J˜ ¨GÐ4Ô5áØ�J‰J˜ ¨GÐ4Ô5à(�D×(Ñ(¨#Ð.×.ˆà×"Ñ"¤>°3Ó7Ð7ð /ús   ‚A'BÁ)BÁ*BrÖ  r×  rl  rØ  r‚   c              ƒ   óZ   K  — t         d||g} | j                  |Ž ƒ d{  –—† }|dk(  S 7 Œ	­w)rÚ  rÛ  NrÜ  rÝ  rÞ  s        re   rß  zAsyncSearchCommands.config_setÙ  s:   è ø€ ô ˜5 &¨%Ð0ˆØ(�D×(Ñ(¨#Ð.×.ˆØ�d‰{Ðð /ús   ‚+Ÿ) 
+rà  c              ƒ   ó~   K  — t         d|g}i } | j                  |Ž ƒ d{  –—† }| j                  t         |«      S 7 Œ­w)râ  rã  Nrä  rå  s       re   ræ  zAsyncSearchCommands.config_getë  sF   è ø€ ô ˜5 &Ð)ˆØˆØ(�D×(Ñ(¨#Ð.×.ˆØ×"Ñ"¤:¨sÓ3Ð3ð /ús   ‚= ;¡=r¡   c              ƒ   ó   K  — | j                   j                  |«      ƒ d{  –—† }|j                  «       D ��ci c]%  \  }}t        |«      t	        |t        |«      |«      “Œ' }}}	 |d= t        dd|i|¤ŽS 7 ŒUc c}}w # t
        $ r Y Œ w xY w­w)rx  Nr‡   r¿   ry  r|  s         re   r}  z!AsyncSearchCommands.load_documentý  s�   è ø€ ð —{‘{×*Ñ*¨2Ó.×.ˆð Ÿ™›÷
á��1ô ˜‹OÔ/°´<À³?ÀOÓTÑTð
ˆñ 
ð
	Ø�t�ô Ñ(˜2Ð( Ñ(Ð(ð /úó
øô ò 	Ùð	üsD   ‚B¡A7¢B¹*A9Á#BÁ'A? Á*BÁ9BÁ?	BÂBÂ
BÂBc              �   ó„  K  — | j                  d¬«      }|D ]‰  }t        ||j                  |j                  g}|j	                  d«      r|j                  d«       |j                  r,|j                  d«       |j                  |j                  «        |j                  |Ž  Œ‹ |j                  «       ƒ d{  –—† d   S 7 Œ­w)aI  
        Add suggestion terms to the AutoCompleter engine. Each suggestion has
        a score and string.
        If kwargs["increment"] is true and the terms are already in the
        server's dictionary, we increment their scores.

        For more information see `FT.SUGADD <https://redis.io/commands/ft.sugadd>`_.
        Frû  rý  rþ  rZ  Nrÿ  r   r  s          re   r  zAsyncSearchCommands.sugadd  s¡   è ø€ ð �}‰}¨ˆ}Ó/ˆØò 	(ˆCÜ" C¨¯©°S·Y±YÐ?ˆDØ�z‰z˜+Ô&Ø—‘˜FÔ#Ø�{Š{Ø—‘˜IÔ&Ø—‘˜CŸK™KÔ(à ˆD× Ñ  $Ò'ð	(ð —l‘l“n×$ bÑ)Ð)Ð$ús   ‚B4C Â6B>Â7C r{   r  r  r  r    r  c              ƒ   ó,  K  — t         ||d|g}|r|j                  t        «       |r|j                  t        «       |r|j                  t        «        | j
                  |Ž ƒ d{  –—† }g }	|s|	S t        |||«      }
|
D �cg c]  }|‘Œ c}S 7 Œ'c c}w ­w)r  r  Nr  )rd   r{   r  r  r  r    r  rC  Úretr†   r  rà   s               re   r  zAsyncSearchCommands.sugget)  s‘   è ø€ ôP   V¨U°CÐ8ˆÙØ�K‰KœÔÙØ�K‰Kœ
Ô#ÙØ�K‰KœÔ%à(�D×(Ñ(¨$Ð/×/ˆØˆÙØˆNä! +¨}¸cÓBˆØ!Ö"�a’Ò"Ð"ð 0úò #ùs$   ‚A#BÁ%BÁ&BÂ	BÂ
BÂBrw   r#  r$  r%  )&r'  r(  r)  rÕ   r   rÛ   rÜ   rù  r   r#   r   r   rª   r«   r˜  r   r   r   r   r   r   r   r   r¥  r   r   rµ  rÈ  r   r  rß  ræ  r   r}  r  r   r%   r  r¿   rg   re   r.  r.  "  s5  „ ò	2ð8  S¨5¡[Ñ!1ó 8ð( LPñ"
à�S˜%�ZÑ ð"
ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHó"
ñH Óð :>Ø@DØRVØ!%Ø.2ñ7?àð7?ð !Ð!5Ñ6ð7?ð "Ð"<Ñ=ð	7?ð
 & d¨3°°c¸3ÀÀuÐ6LÑ0MÐ+MÑ&NÑOð7?ð ˜#‘ð7?ð Ð*Ñ+ð7?ð 
ˆ|Ð/°Ð9Ñ	:ò7?ó ð7?ðx LPñ
à�_ fÐ,Ñ-ð
ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHó
ó@8ñ8 ØØUôð sð °3ð ¸4ò ó	ðñ ØØUôð4 sð 4¨sò 4ó	ð4ñ)°xÀÀSÈ#ÀXÁÑ7Oó )ò**ð6 ØØ!Ø#ñ6#àð6#ð ð6#ð ð	6#ð
 ð6#ð ð6#ð ð6#ð 
ÐÑ	ô6#rg   r.  )`rE  r“  Útypingr   r   r   r   r   r   Úredis._parsers.helpersr	   Úredis.clientr
   r   Ú"redis.commands.search.hybrid_queryr   r   r   r   Ú#redis.commands.search.hybrid_resultr   r   Úredis.typingr   Úredis.utilsr   r   r   r   r   Úhelpersr   r   Úaggregationr   r   r   Údocumentr   Úfieldr    Úindex_definitionr!   Úprofile_informationr"   ri   r#   rµ   r$   r¸   r%   r&   rA  rO  r7   r`  rj  rU  r§  ÚEXPLAINCLI_CMDrt  r;   r=   r²  r?   rÌ  rÑ  rÔ  r  rA   ré  rí  rñ  rô  rE   r5   r  r  r
  r  r  rC   r9   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r3   r.  r¿   rg   re   ú<module>rI     sN  ðÛ Û ß 8× 8å 0ß /÷ó ÷ QÝ ÷õ ÷ A÷ñ õ
 Ý Ý -Ý 3Ý Ý Ý (à
€à€
Ø€	Ø€
Ø
€Ø€Ø€Ø€Ø €Ø
€Ø€Ø€Ø€
Ø €Ø€Ø€Ø€Ø€Ø€
Ø€Ø€Ø#Ð Ø€Ø€Ø€Ø€Ø€Ø€Ø€Ø€Ø€Ø€
à€	Ø€Ø€Ø
€Ø€Ø€	Ø€	Ø#€Ø€
Ø€Ø€÷K5ñ K5ô\6}#˜.õ }#rg   