class_docstr: Search commands.
class_docstr_tok: ["Search","commands","."]
docstr: 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.
docstr_tok: ["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","."]
code: def add_document_hash(
      self, doc_id, score=1.0, language=None, replace=False
  ):
      """
      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.
      """  # noqa
      return self._add_document_hash(
          doc_id,
          conn=None,
          score=score,
          language=language,
          replace=replace,
      )
  
imports: import itertools
  import time
  from typing import Dict, List, Optional, Union
  from redis.client import Pipeline
  from redis.utils import deprecated_function
  from ..helpers import get_protocol_version, parse_to_dict
  from ._util import to_string
  from .aggregation import AggregateRequest, AggregateResult, Cursor
  from .document import Document
  from .query import Query
  from .result import Result
  from .suggestion import SuggestionParser
label_desc: Use image node_id 16 for calling the SearchCommands obj's underlying member method code with example usage: obj.add_document_hash(doc_id, score, language, replace) and returns: self