Ë
    §Œj&¬  ã                   óÖ  — d dl Z d dlZd dl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mZ dd	lmZ d
dl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*m+Z+ d
dl,m-Z- dZ.dZ/dZ0dZ1dZ2d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/ZId0ZJd1ZKd2ZLd3ZMd4ZNd5ZOd6ZPd7ZQd8ZRd9ZSd:ZTd;ZUd<ZVd=ZW G d>„ d?«      ZX G d@„ dAeX«      ZYy)Bé    N)ÚAnyÚDictÚListÚOptionalÚUnion)Úpairs_to_dict)ÚNEVER_DECODEÚPipeline)ÚCombineResultsMethodÚHybridCursorQueryÚHybridPostProcessingConfigÚHybridQuery)ÚHybridCursorResultÚHybridResult)Údeprecated_functionÚexperimental_methodé   )Úget_protocol_versioné   )Ú	to_string)Ú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.AGGREGATEú
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.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d„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zdcd„Z	 	 	 	 	 	 	 	 	 dddee   dededeee      dee   dededefd„Zdeeee   f   fd„Zdedefd„Z	 	 	 	 	 	 	 	 dfd„Z	 dgd„Z edd¬«      	 	 	 	 	 	 	 dhdeded ed!ee   d"ed#ed$ee   d%edee   fd&„«       Z edd¬«      did'„«       Z edd(¬«      djd)„«       Zd*„ Z edd(¬«      d+„ «       Z d,„ Z!d-ee"eeee#ee$f   f      fd.„Z%d-ee"eeee#ee$f   f      fd/„Z&	 dkd0eee'f   d-ee"eeee#ee$f   f   df   fd1„Z( e)«       	 	 	 	 	 dld0e*d2ee+   d3ee,   d4ee"eeee#ee$f   f      d5ee#   d6ee-   d7ee.e/e0f   fd8„«       Z1	 dkd0eee'f   d-ee"eeee#ee$f   f      fd9„Z2d0eee'f   fd:„Z3	 dkd0ee4e5f   d-ee"eeee#ee$f   f      fd;„Z6d<ed0ee4e5f   d=efd>„Z7	 	 dmd0ee'e4f   d?ed-ee"eeee#ee$f   f      fd@„Z8dndA„Z9dBedCee   fdD„Z:dBedCee   fdE„Z;dBefdF„Z< edGdH¬«      dIedJed7efdK„«       Z= edGdL¬«      dIed7efdM„«       Z>dNefdO„Z?dPefdQ„Z@dPefdR„ZAdPefdS„ZBdT„ ZCdUed7e#fdV„ZDdUedWed7e#fdX„ZE	 	 	 	 dodUedYedZed[e#d\ed]ed7eeF   fd^„ZGded_ed`edCee   fda„ZHdb„ ZIy)pÚSearchCommandszSearch commands.c                 ó€   — t        | j                  «      dv r|dk(  rt        |«      S |S  | j                  |   |fi |¤ŽS )N©Ú3é   r"   )r   Úclientr   Ú_RESP2_MODULE_CALLBACKS)ÚselfÚcmdÚresÚkwargss       úh/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/redis/commands/search/commands.pyÚ_parse_resultszSearchCommands._parse_resultsP   sH   € Ü §¡Ó,°Ñ8Ø.1°\Ò.AÔ% cÓ*ÐJÀsÐJà4�4×/Ñ/°Ñ4°SÑC¸FÑCÐCó    c                 óL   — t        t        |«      }t        t        ||«      «      S ©N)Úmapr   ÚdictÚzip)r6   r8   r9   Úits       r:   Ú_parse_infozSearchCommands._parse_infoV   s   € Ü”˜CÓ ˆÜ”C˜˜B“KÓ Ð r<   c           	      ó”   — t        ||d   j                   |d   |d   j                  |d   j                  |d   j                  ¬«      S )NÚqueryÚduration)rF   Úhas_payloadÚwith_scoresÚfield_encodings)r   Ú_no_contentÚ_with_payloadsÚ_with_scoresÚ_return_fields_decode_as©r6   r8   r9   s      r:   Ú_parse_searchzSearchCommands._parse_searchZ   sQ   € ÜØØ�w‘×+Ñ+Ð+Ø˜JÑ'Ø˜w™×6Ñ6Ø˜w™×4Ñ4Ø" 7™O×DÑDô
ð 	
r<   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_keysÚcursorÚSEARCHÚVSIM)Úsearch_cursor_idÚvsim_cursor_idÚresultsÚtotal_resultsÚwarningsÚexecution_time)rX   rW   rY   rZ   )r   r   ÚintÚappendr   Úfloat)r6   r8   r9   Úres_dictrW   Úres_itemÚ	item_dicts          r:   Ú_parse_hybrid_searchz#SearchCommands._parse_hybrid_searchd   s¢   € Ü  °$Ô7ˆØ�vÑÜ%Ü!$ X¨hÑ%7Ó!8Ü" 8¨FÑ#3Ó4ôð ð
 )+ˆð ! Ô+ˆHÜ% h¸DÔAˆIØ�N‰N˜9Õ%ð ,ô Ü˜h Ñ7Ó8ØØ˜jÑ)Ü  Ð*:Ñ!;Ó<ô	
ð 	
r<   c                 ó4   — | j                  ||d   |d   «      S )NrE   Ú
has_cursor)Ú_get_aggregate_resultrN   s      r:   Ú_parse_aggregatezSearchCommands._parse_aggregatez   s    € Ø×)Ñ)¨#¨v°g©ÀÀ|Ñ@TÓUÐUr<   c                 óø   — |d   }t        |t        «      r!| j                  |d   ||j                  «      }n5t	        |d   |j
                   |d   |j                  |j                  ¬«      }|t        |d   «      fS )NrE   r   rF   )rF   rG   rH   r   )	Ú
isinstancer   rd   Ú_cursorr   rJ   rK   rL   r   )r6   r8   r9   rE   Úresults        r:   Ú_parse_profilezSearchCommands._parse_profile}   s€   € Ø�w‘ˆÜ�eÔ-Ô.Ø×/Ñ/°°A±¸¸u¿}¹}ÓM‰FäØ�A‘Ø×%Ñ%Ð%Ø 
Ñ+Ø!×0Ñ0Ø!×.Ñ.ôˆFð Ô)¨#¨a©&Ó1Ð1Ð1r<   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   r3   r   r   )ÚscoreÚ
suggestion)rg   r[   Úlen)r6   r8   r9   ÚcorrectionsÚ_correctionÚ_items         r:   Ú_parse_spellcheckz SearchCommands._parse_spellcheckŒ   s    € ØˆØ�!Š8ØÐãˆKÜ˜+¤sÔ+°¸qÒ0@Øä�;Ó 1Ò$ØØ˜q’>ØØ˜q‘> !Ò$Øð$ JUÐUVÊó+ÙIWÀ˜% ™(°%¸±(Ó;Èñ+ˆK˜ A™Ò'ð5 ð< Ðùò	+s   Á
A)c                 óB   — |r|D �ci c]  }|d   |d   “Œ c}S i S c c}w )Nr   r   © )r6   r8   r9   Úkvss       r:   Ú_parse_config_getz SearchCommands._parse_config_get±   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   )Úrangern   )r6   r8   r9   Úis       r:   Ú_parse_syndumpzSearchCommands._parse_syndump´   s:   € Ü,1°!´S¸³X¸qÔ,AÓBÑ,A q��A‘˜˜A ™E™
Ñ"Ð,AÑBÐBùÒBs   ™/c                 ó(   — | j                  | |¬«      S )zT
        Create a new batch indexer from the client with a given chunk size
        )Ú
chunk_size)ÚBatchIndexer)r6   r|   s     r:   Úbatch_indexerzSearchCommands.batch_indexer·   s   € ð × Ñ  °*Ð Ó=Ð=r<   NÚ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r>   ©Ú
redis_args©Ú.0Úfs     r:   Ú	<genexpr>z.SearchCommands.create_index.<locals>.<genexpr>ý   ó   è ø€ Ð*JÁ6¸a¨1¯<©<¯>Á6ùó   ‚)Ú
CREATE_CMDÚ
index_nameÚargsr\   r'   rg   r[   r(   r#   r%   r$   r&   r*   ÚlistÚtupleÚsetr)   rn   Ú	itertoolsÚchainÚ	TypeErrorr‹   Úexecute_command)r6   r   r€   r�   r‚   rƒ   Úmax_text_fieldsÚ	temporaryr„   r…   r†   r”   s               r:   Ú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>`_.
        rˆ   ÚADDc              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr>   rŠ   rŒ   s     r:   r�   z2SearchCommands.alter_schema_add.<locals>.<genexpr>  r�   r‘   )Ú	ALTER_CMDr“   r•   r˜   r™   rš   r‹   r›   )r6   r   r”   s      r:   Ú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_CMDr“   rg   Úboolr\   r›   )r6   r¤   r”   Ú
delete_strs       r:   Ú	dropindexzSearchCommands.dropindex  sX   € ô ˜tŸ™Ð/ˆô Ð*¬DÔ1Ð6FÈ$Ñ6Nñ àð 	ñ Ø�K‰K˜
Ô#à#ˆt×#Ñ# TÐ*Ð*r<   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_CMDr“   r\   r•   r˜   r™   Úitemsr›   )r6   Údoc_idÚconnÚnosaverl   ÚpayloadÚreplaceÚpartialÚlanguageÚ	no_creater   r”   s               r:   Ú_add_documentzSearchCommands._add_document0  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Ð*Ð*r<   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_CMDr“   r\   r›   )r6   r¶   r·   rl   r¼   rº   r”   s          r:   Ú_add_document_hashz!SearchCommands._add_document_hashZ  sc   € ô ˜TŸ_™_¨f°eÐ<ˆáØ�K‰K˜	Ô"áØ�Z Ð*Ñ*ˆDàÐØ'�4×'Ñ'¨Ð.Ð.à#ˆt×#Ñ# TÐ*Ð*r<   z2.0.0z2deprecated since redisearch 2.0, call hset instead©ÚversionÚreasonr¶   r¸   rl   r¹   rº   r»   r¼   r½   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 shoule be encoded as strings of "lon,lat"
        N)r·   r¸   rl   r¹   rº   r»   r¼   r½   )r¾   )
r6   r¶   r¸   rl   r¹   rº   r»   r¼   r½   r   s
             r:   Úadd_documentzSearchCommands.add_documentn  sD   € ðV "ˆt×!Ñ!Øð
àØØØØØØØñ
ð ñ
ð 	
r<   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)r·   rl   r¼   rº   )rÁ   )r6   r¶   rl   r¼   rº   s        r:   Úadd_document_hashz SearchCommands.add_document_hash¦  s'   € ð  ×&Ñ&Ø˜ U°XÀwð 'ó 
ð 	
r<   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
        r¦   )ÚDEL_CMDr“   r\   r›   )r6   r¶   r·   Údelete_actual_documentr”   s        r:   Údelete_documentzSearchCommands.delete_documentº  sO   € ô ˜Ÿ™¨&Ð1ˆÙ!Ø�K‰K˜ÔàÐØ'�4×'Ñ'¨Ð.Ð.à#ˆt×#Ñ# TÐ*Ð*r<   c                 óò   — | j                   j                  |«      }|j                  «       D ��ci c]  \  }}t        |«      t        |«      “Œ }}}|}	 |d= t        dd|i|¤ŽS c c}}w # t        $ r Y Œw xY w)ú.
        Load a single document by id
        Úidrt   ©r4   Úhgetallrµ   r   ÚKeyErrorr   ©r6   rÏ   r   ÚkÚvÚf2s         r:   Úload_documentzSearchCommands.load_documentÎ  sƒ   € ð —‘×$Ñ$ RÓ(ˆØ5;·\±\´^ÔD±^©T¨Q°Œi˜‹lœI a›LÑ(°^ˆÑDØˆð	Ø�t�ô Ñ(˜2Ð( Ñ(Ð(ùó Eøô
 ò 	Ùð	ús   ¯A$ÁA* Á*	A6Á5A6c                 óF   —  | j                   t        | j                  g|¢­Ž S )z�
        Returns the full contents of multiple documents.

        ### Parameters

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

        )r›   ÚMGET_CMDr“   )r6   Úidss     r:   ÚgetzSearchCommands.getÝ  s"   € ð $ˆt×#Ñ#¤H¨d¯o©oÐDÀÒDÐDr<   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>`_.
        ©r›   ÚINFO_CMDr“   r;   ©r6   r8   s     r:   ÚinfozSearchCommands.infoê  s-   € ð ×"Ñ"¤8¨T¯_©_Ó=ˆØ×"Ñ"¤8¨SÓ1Ð1r<   Úquery_paramsc                 óþ   — |€g S g }t        |«      dkD  rh|j                  d«       |j                  t        |«      dz  «       |j                  «       D ]'  \  }}|j                  |«       |j                  |«       Œ) |S )Nr   ÚPARAMSr   )rn   r\   rµ   )r6   râ   r”   ÚkeyÚvalues        r:   Úget_params_argszSearchCommands.get_params_argsõ  sy   € ð ÐØˆIØˆÜˆ|Ó˜qÒ Ø�K‰K˜Ô!Ø�K‰Kœ˜LÓ)¨AÑ-Ô.Ø*×0Ñ0Ö2‘
��UØ—‘˜CÔ Ø—‘˜EÕ"ð 3ð ˆr<   c                 óö   — | j                   g}t        |t        «      rt        |«      }t        |t        «      st	        dt        |«      › �«      ‚||j                  «       z  }|| j                  |«      z  }||fS )NzBad query type )r“   rg   Ústrr   Ú
ValueErrorÚtypeÚget_argsrç   )r6   rE   râ   r”   s       r:   Ú_mk_query_argszSearchCommands._mk_query_args  ss   € ð —‘Ð ˆä�eœSÔ!ä˜%“LˆEÜ˜%¤Ô'Ü˜¬t°E«{¨mÐ<Ó=Ð=à�—‘Ó Ñ ˆØ�×$Ñ$ \Ó2Ñ2ˆà�Uˆ{Ðr<   rE   c                 óT  — | j                  ||¬«      \  }}t        j                  «       }i }t        | j                  «      dvr	d|t
        <    | 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â   r1   Tç     @�@©rE   rF   ©rí   ÚtimeÚ	monotonicr   r4   r	   r›   Ú
SEARCH_CMDrg   r
   r;   ©r6   rE   râ   r”   ÚstÚoptionsr8   s          r:   ÚsearchzSearchCommands.search  s¦   € ð  ×)Ñ)¨%¸lÐ)ÓK‰ˆˆeÜ�^‰^ÓˆàˆÜ §¡Ó,°HÑ<Ø$(ˆG”LÑ!à"ˆd×"Ñ"¤:Ð@°Ò@¸Ñ@ˆä�cœ8Ô$ØˆJà×"Ñ"Ü˜ 5´D·N±NÓ4DÀrÑ4IÈVÑ3Sð #ó 
ð 	
r<   Úcombine_methodÚpost_processingÚparams_substitutionÚtimeoutrR   Úreturnc                 ób  — | j                   }i }t        |g}	|	j                  |j                  «       «       |r|	j                  |j                  «       «       |r|	j                  |j	                  «       «       |r |	j                  | j                  |«      «       |r|	j                  d|f«       |r$d|d<   |	j                  |j	                  «       «       t        | j                  «      dvr	d|t        <    | 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>`.
        ÚTIMEOUTTrR   r1   ©r“   Ú
HYBRID_CMDÚextendrì   Ú
build_argsrç   r   r4   r	   r›   rg   r
   r;   ©r6   rE   rû   rü   rý   rþ   rR   Úindexrù   Úpiecesr8   s              r:   Úhybrid_searchzSearchCommands.hybrid_search3  s  € ð8 —‘ˆØˆÜ˜eÐ$ˆØ�‰�e—n‘nÓ&Ô'ÙØ�M‰M˜.×1Ñ1Ó3Ô4ÙØ�M‰M˜/×4Ñ4Ó6Ô7ÙØ�M‰M˜$×.Ñ.Ð/BÓCÔDÙØ�M‰M˜9 gÐ.Ô/ÙØ $ˆG�HÑØ�M‰M˜&×+Ñ+Ó-Ô.ä §¡Ó,°HÑ<Ø$(ˆG”LÑ!à"ˆd×"Ñ" FÐ6¨gÑ6ˆä�cœ8Ô$ØˆJà"ˆt×"Ñ"¤:¨sÑ>°gÑ>Ð>r<   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í   r›   ÚEXPLAIN_CMD)r6   rE   râ   r”   Ú
query_texts        r:   ÚexplainzSearchCommands.explaini  s6   € ð  ×.Ñ.¨uÀ<Ð.ÓPÑˆˆjØ#ˆt×#Ñ#¤KÐ7°$Ò7Ð7r<   c                 ó   — t        d«      ‚)Nz#EXPLAINCLI will not be implemented.)ÚNotImplementedError)r6   rE   s     r:   Úexplain_clizSearchCommands.explain_cliu  s   € Ü!Ð"GÓHÐHr<   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 query©rE   rc   ©rg   r   r©   rh   ÚAGGREGATE_CMDr“   r  r   Ú
CURSOR_CMDrê   rç   r›   r;   ©r6   rE   râ   rc   r7   Úraws         r:   Ú	aggregatezSearchCommands.aggregatex  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¸
ð #ó 
ð 	
r<   r  rc   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   )rg   r   Úcidr   Ú_with_schemar   )r6   r  rE   rc   rR   ÚschemaÚrowss          r:   rd   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Ð4r<   Ú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.

        r§   ÚLIMITEDÚQUERYÚ	AGGREGATEr   rS   z5Must provide AggregateRequest object or Query object.rñ   rò   )rô   rõ   ÚPROFILE_CMDr“   r\   rg   r   r  r   rì   rç   rê   r›   r;   )r6   rE   r"  râ   rø   r7   r8   s          r:   Úprofilez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ð #ó 
ð 	
r<   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©ÚSPELLCHECK_CMDr“   r  r›   r;   ©r6   rE   ÚdistanceÚincludeÚexcluder7   r8   s          r:   Ú
spellcheckzSearchCommands.spellcheckÖ  sy   € ô ˜tŸ™°Ð6ˆÙØ�J‰J˜
 HÐ-Ô.áØ�J‰J˜ ¨GÐ4Ô5áØ�J‰J˜ ¨GÐ4Ô5à"ˆd×"Ñ" CÐ(ˆà×"Ñ"¤>°3Ó7Ð7r<   Ú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  r›   ©r6   r5  r6  r7   s       r:   Údict_addzSearchCommands.dict_addò  ó-   € ô ˜TÐ"ˆØ�
‰
�5ÔØ#ˆt×#Ñ# SÐ)Ð)r<   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  r›   r9  s       r:   Údict_delzSearchCommands.dict_del   r;  r<   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_CMDr›   )r6   r5  r7   s      r:   Ú	dict_dumpzSearchCommands.dict_dump  s!   € ô ˜dÐ#ˆØ#ˆt×#Ñ# SÐ)Ð)r<   ú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©Ú
CONFIG_CMDr›   ©r6   rD  ræ   r7   r  s        r:   Ú
config_setzSearchCommands.config_set  s.   € ô ˜5 &¨%Ð0ˆØ"ˆd×"Ñ" CÐ(ˆØ�d‰{Ðr<   ú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©rJ  r›   r;   ©r6   rD  r7   r8   s       r:   Ú
config_getzSearchCommands.config_get,  s5   € ô ˜5 &Ð)ˆØ"ˆd×"Ñ" CÐ(ˆØ×"Ñ"¤:¨sÓ3Ð3r<   Ú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>`_.
        )r›   ÚTAGVALS_CMDr“   )r6   rT  s     r:   ÚtagvalszSearchCommands.tagvals=  s   € ð ×#Ñ#¤K°·±À(ÓKÐKr<   Ú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>`_.
        )r›   ÚALIAS_ADD_CMDr“   ©r6   rX  s     r:   ÚaliasaddzSearchCommands.aliasaddJ  s   € ð ×#Ñ#¤M°5¸$¿/¹/ÓJÐJr<   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>`_.
        )r›   ÚALIAS_UPDATE_CMDr“   r[  s     r:   ÚaliasupdatezSearchCommands.aliasupdateW  s   € ð ×#Ñ#Ô$4°e¸T¿_¹_ÓMÐMr<   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>`_.
        )r›   ÚALIAS_DEL_CMDr[  s     r:   ÚaliasdelzSearchCommands.aliasdeld  s   € ð ×#Ñ#¤M°5Ó9Ð9r<   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ÚINCRr®   éÿÿÿÿ©	ÚpipelineÚSUGADD_COMMANDÚstringrl   rÛ   r\   r¹   r›   Úexecute©r6   rå   Úsuggestionsr9   ÚpipeÚsugr”   s          r:   ÚsugaddzSearchCommands.sugaddp  s’   € ð �}‰}¨ˆ}Ó/ˆÛˆCÜ" C¨¯©°S·Y±YÐ?ˆDØ�z‰z˜+Ô&Ø—‘˜FÔ#Ø�{Š{Ø—‘˜IÔ&Ø—‘˜CŸK™KÔ(à ˆD× Ñ  $Ò'ð ð �|‰|‹~˜bÑ!Ð!r<   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>`_.
        )r›   ÚSUGLEN_COMMAND)r6   rå   s     r:   ÚsuglenzSearchCommands.suglen‡  s   € ð ×#Ñ#¤N°CÓ8Ð8r<   rl  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>`_.
        )r›   ÚSUGDEL_COMMAND)r6   rå   rl  s      r:   ÚsugdelzSearchCommands.sugdel�  s   € ð ×#Ñ#¤N°C¸Ó@Ð@r<   ÚprefixÚfuzzyÚnumrH   Ú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\   r,   r+   r-   r›   r    )r6   rå   ry  rz  r{  rH   r|  r”   r8   rW   ÚparserÚss               r:   ÚsuggetzSearchCommands.sugget˜  s‡   € ôP   V¨U°CÐ8ˆÙØ�K‰KœÔÙØ�K‰Kœ
Ô#ÙØ�K‰KœÔ%à"ˆd×"Ñ" DÐ)ˆØˆÙØˆNä! +¨}¸cÓBˆÙ!Ó"™6�a’˜6Ñ"Ð"ùÒ"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_CMDr“   r  r›   )r6   r…  r†  r6  r7   s        r:   Ú	synupdatezSearchCommands.synupdateÐ  sF   € ô$ ˜dŸo™o¨wÐ7ˆÙØ�J‰JÐ)Ð*Ô+Ø�
‰
�5ÔØ#ˆt×#Ñ# SÐ)Ð)r<   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>`_.
        )r›   ÚSYNDUMP_CMDr“   r;   rà   s     r:   ÚsyndumpzSearchCommands.syndumpè  s-   € ð ×"Ñ"¤;°·±Ó@ˆØ×"Ñ"¤;°Ó4Ð4r<   )éd   )	FFNNFNFFF)F)NFç      ð?NFFNF)NrŽ  NF)FrŽ  NFFNF)rŽ  NF)NFr>   ©NNNNN)FN©NNN©Fé
   FF)JÚ__name__Ú
__module__Ú__qualname__Ú__doc__r;   rC   rO   ra   re   rj   rr   rv   rz   r~   r   r   r©   r   ré   r   rž   r   r£   r«   r¾   rÁ   r   r]   rÆ   rÈ   rÌ   r×   rÛ   rá   r   r[   Úbytesrç   rí   r   rú   r   r   r   r   r   r   r   r
   r
  r  r  r   r   r  rd   r(  r4  r:  r>  rA  rL  rS  rW  r\  r_  rb  rr  ru  rx  r    r„  r‰  rŒ  rt   r<   r:   r/   r/   M   s  „ ÙòDò!ò
ò
ò,Vò2ò#òJ>òCó>ð !&Ø$Ø)-Ø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ð+ò&)ñ  Ð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ó
ñ@ Óð :>Ø@DØRVØ!%Ø.2ñ3?àð3?ð !Ð!5Ñ6ð3?ð "Ð"<Ñ=ð	3?ð
 & d¨3°°c¸3ÀÀuÐ6LÑ0MÐ+MÑ&NÑOð3?ð ˜#‘ð3?ð Ð*Ñ+ð3?ð 
ˆ|Ð/°Ð9Ñ	:ò3?ó ð3?ðp 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ó	&
óP8ð8*˜Sð *¨$¨s©)ó *ð*˜Sð *¨$¨s©)ó *ð
*˜có 
*ñ ØØUôð ð ¨Sð °Tò ó	ðñ ØØUôð4 ð 4¨ò 4ó	ð4ðL ó LðK˜có KðN ó Nð
:˜có 
:ò"ð.9˜#ð 9 #ó 9ðA˜#ð A sð A¨só Að ØØ!Ø#ñ6#àð6#ð ð6#ð ð	6#ð
 ð6#ð ð6#ð ð6#ð 
ÐÑ	ó6#ñp* ð *°4ð *ÈÈcÉó *ó0
5r<   r/   c                   ó°  — e Zd Z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„ 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     r:   rá   zAsyncSearchCommands.infoö  s:   è ø€ ð ×(Ñ(¬°4·?±?ÓC×CˆØ×"Ñ"¤8¨SÓ1Ð1ð Dús   ‚$A¦A§ANrE   râ   c              ƒ   óp  K  — | j                  ||¬«      \  }}t        j                  «       }i }t        | j                  «      dvr	d|t
        <    | j                  t        g|¢­i |¤Žƒ d{  –—† }t        |t        «      r|S | j                  t        ||t        j                  «       |z
  dz  ¬«      S 7 ŒG­w)rï   rð   r1   TNrñ   rò   ró   r÷   s          r:   rú   zAsyncSearchCommands.search  s³   è ø€ ð  ×)Ñ)¨%¸lÐ)ÓK‰ˆˆeÜ�^‰^ÓˆàˆÜ §¡Ó,°HÑ<Ø$(ˆG”LÑ!à(�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þ   rR   rÿ   c              ƒ   ó~  K  — | j                   }i }t        |g}	|	j                  |j                  «       «       |r|	j                  |j                  «       «       |r|	j                  |j	                  «       «       |r |	j                  | j                  |«      «       |r|	j                  d|f«       |r$d|d<   |	j                  |j	                  «       «       t        | j                  «      dvr	d|t        <    | j                  |	i |¤Žƒ d{  –—† }
t        |
t        «      r|
S  | j                  t        |
fi |¤ŽS 7 Œ.­w)r  r  TrR   r1   Nr  r  s              r:   r
  z!AsyncSearchCommands.hybrid_search!  s  è ø€ ð8 —‘ˆØˆÜ˜eÐ$ˆØ�‰�e—n‘nÓ&Ô'ÙØ�M‰M˜.×1Ñ1Ó3Ô4ÙØ�M‰M˜/×4Ñ4Ó6Ô7ÙØ�M‰M˜$×.Ñ.Ð/BÓCÔDÙØ�M‰M˜9 gÐ.Ô/ÙØ $ˆG�HÑØ�M‰M˜&×+Ñ+Ó-Ô.ä §¡Ó,°HÑ<Ø$(ˆG”LÑ!à(�D×(Ñ(¨&Ð<°GÑ<×<ˆä�cœ8Ô$ØˆJà"ˆt×"Ñ"¤:¨sÑ>°gÑ>Ð>ð =ús   ‚D
D=ÄD;Ä/D=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         r:   r  zAsyncSearchCommands.aggregateW  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.  r0  s          r:   r4  zAsyncSearchCommands.spellcheckw  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rB  rC  rÂ   rD  ræ   c              ƒ   óZ   K  — t         d||g} | j                  |Ž ƒ d{  –—† }|dk(  S 7 Œ	­w)rF  rG  NrH  rI  rK  s        r:   rL  zAsyncSearchCommands.config_set“  s:   è ø€ ô ˜5 &¨%Ð0ˆØ(�D×(Ñ(¨#Ð.×.ˆØ�d‰{Ðð /ús   ‚+Ÿ) 
+rM  c              ƒ   ó~   K  — t         d|g}i } | j                  |Ž ƒ d{  –—† }| j                  t         |«      S 7 Œ­w)rO  rP  NrQ  rR  s       r:   rS  zAsyncSearchCommands.config_get¥  sF   è ø€ ô ˜5 &Ð)ˆØˆØ(�D×(Ñ(¨#Ð.×.ˆØ×"Ñ"¤:¨sÓ3Ð3ð /ús   ‚= ;¡=c              ƒ   ó  K  — | j                   j                  |«      ƒ d{  –—† }|j                  «       D ��ci c]  \  }}t        |«      t        |«      “Œ }}}|}	 |d= t        dd|i|¤ŽS 7 ŒLc c}}w # t        $ r Y Œ w xY w­w)rÎ   NrÏ   rt   rÐ   rÓ   s         r:   r×   z!AsyncSearchCommands.load_document·  s‹   è ø€ ð —{‘{×*Ñ*¨2Ó.×.ˆØ5;·\±\´^ÔD±^©T¨Q°Œi˜‹lœI a›LÑ(°^ˆÑDØˆð	Ø�t�ô Ñ(˜2Ð( Ñ(Ð(ð /úÛDøô
 ò 	Ùð	üsD   ‚B¡A.¢B¹A0ÁBÁA6 Á!BÁ0BÁ6	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>`_.
        Frd  rf  rg  r®   Nrh  ri  rn  s          r:   rr  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å   ry  rz  r{  rH   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€  )r6   rå   ry  rz  r{  rH   r|  r”   ÚretrW   r‚  rƒ  s               r:   r„  zAsyncSearchCommands.suggetÝ  s•   è ø€ ôP   V¨U°CÐ8ˆÙØ�K‰KœÔÙØ�K‰Kœ
Ô#ÙØ�K‰KœÔ%à(�D×(Ñ(¨$Ð/×/ˆØˆÙØˆNä! +¨}¸cÓBˆÙ!Ó"™6�a’˜6Ñ"Ð"ð 0úò #ùs$   ‚A#BÁ%BÁ&BÂ	BÂ
BÂB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  r4  r   r©   rL  rS  r×   rr  r   r    r„  rt   r<   r:   r™  r™  õ  s  „ ò	2ð LPñ
à�S˜%�ZÑ ð
ð ˜t C¨¨s°C¸ÀÐ/EÑ)FÐ$FÑGÑHó
ñ@ Óð :>Ø@DØRVØ!%Ø.2ñ3?àð3?ð !Ð!5Ñ6ð3?ð "Ð"<Ñ=ð	3?ð
 & d¨3°°c¸3ÀÀuÐ6LÑ0MÐ+MÑ&NÑOð3?ð ˜#‘ð3?ð Ð*Ñ+ð3?ð 
ˆ|Ð/°Ð9Ñ	:ò3?ó ð3?ðp 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ò)ò*ð6 ØØ!Ø#ñ6#àð6#ð ð6#ð ð	6#ð
 ð6#ð ð6#ð ð6#ð 
ÐÑ	ô6#r<   r™  )Zr˜   rô   Útypingr   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.utilsr   r   Úhelpersr   Ú_utilr   Úaggregationr   r   r   Údocumentr   Úfieldr   Úindex_definitionr   Úprofile_informationr   rE   r   ri   r   rm   r    r!   r’   r¢   rö   r´   rÀ   r¨   r  ÚEXPLAINCLI_CMDrÊ   r  r'  r  r/  r8  r=  r@  rÙ   rJ  rV  rZ  r^  ra  rß   rk  rw  rt  r�  rˆ  r‹  r  r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r/   r™  rt   r<   r:   Ú<module>r³     s?  ðÛ Û ß 3Õ 3å 0ß /÷ó ÷ Qß @å *Ý ÷ñ õ
 Ý Ý -Ý 3Ý Ý Ý (à
€à€
Ø€	Ø€
Ø
€Ø€Ø€Ø€Ø €Ø
€Ø€Ø€Ø€
Ø €Ø€Ø€Ø€Ø€Ø€
Ø€Ø€Ø#Ð Ø€Ø€Ø€Ø€Ø€Ø€Ø€Ø€Ø€
à€	Ø€Ø€Ø
€Ø€Ø€	Ø€	Ø#€Ø€
Ø€Ø€÷e5ñ e5ôP^#˜.õ ^#r<   