|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /lib/python3.9/site-packages/redis/commands/search/__pycache__/ |
a
��b� � @ s. d dl mZ G dd� de�ZG dd� d�ZdS )� )�Enumc @ s e Zd ZdZdZdZdS )� IndexTypez,Enum of the currently supported index types.� � N)�__name__�
__module__�__qualname__�__doc__�HASH�JSON� r r �I/usr/lib/python3.9/site-packages/redis/commands/search/indexDefinition.pyr s r c @ sZ e Zd ZdZg dddddddfdd�Zdd� Zdd � Zd
d� Zdd
� Zdd� Z dd� Z
dS )�IndexDefinitionzgIndexDefinition is used to define a index definition for automatic
indexing on Hash or Json update.Ng �?c C sJ g | _ | �|� | �|� | �|� | �||� | �||� | �|� d S )N)�args�_append_index_type�_append_prefix�_append_filter�_append_language�
_append_score�_append_payload) �self�prefix�filter�language_field�language�score_field�score�
payload_field�
index_typer r r
�__init__ s
zIndexDefinition.__init__c C sV |t ju r| j�ddg� n6|t ju r8| j�ddg� n|durRtdtt �� ���dS )z4Append `ON HASH` or `ON JSON` according to the enum.ZONr
r Nzindex_type must be one of )r r
r �extendr �RuntimeError�list)r r r r r
r "