HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/lib/python3.9/site-packages/redis/commands/search/__pycache__/result.cpython-39.pyc
a

��b7�@s*ddlmZddlmZGdd�d�ZdS)�)�	to_string)�Documentc@s"eZdZdZd	dd�Zdd�ZdS)
�Resultz[
    Represents the result of a search query, and has an array of Document
    objects
    �FcCs�|d|_||_g|_d}|r&|d}|r2|d}|r>|d}|rFdnd}tdt|�|�D�]*}t||�}	|r�t|||�nd}
|r�|dn|}|r�t||d�nd}i}
|r�|r�tttt	t|||ddd��t	t|||ddd�����ni}
z
|
d=Wnt
�yYn0z|
d|
d<|
d=Wnt
�yHYn0|�rft|	f||
d�|
��nt|	fd	|
i|
��}|j�|�qZdS)
zy
        - **snippets**: An optional dictionary of the form
        {field: snippet_size} for snippet formatting
        rr�N�id�$Zjson)�score�payloadr
)
�total�duration�docs�range�lenr�float�dict�zip�map�KeyErrorr�append)�self�resZ
hascontentrZhas_payloadZwith_scores�step�offset�irr
Z
fields_offsetr	�fields�doc�r�@/usr/lib/python3.9/site-packages/redis/commands/search/result.py�__init__sV

����	�

��zResult.__init__cCsd|j�d|j�d�S)NzResult{z total, docs: �})rr
)rrrr�__repr__HszResult.__repr__N)rFF)�__name__�
__module__�__qualname__�__doc__rr!rrrrrs�
=rN)Z_utilrZdocumentrrrrrr�<module>s