HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/extras-3.10/redis/commands/search/document.py
class Document:
    """
    Represents a single document in a result set
    """

    def __init__(self, id, payload=None, **fields):
        self.id = id
        self.payload = payload
        for k, v in fields.items():
            setattr(self, k, v)

    def __repr__(self):
        return f"Document {self.__dict__}"

    def __getitem__(self, item):
        value = getattr(self, item)
        return value