Currently, the exists() method in FakeOpenSearch relies on getting a document type that is used alongside the index and document id when checking if a document exists. If a document type is not input, it defaults to None and will return false because it checks, for example, if the document type "_doc" == None.
The opensearchpy implementation does not need a document type input and only needs the index name and document id to check for the existence of the document. In openmock, the exists method should ignore whether the document type matches when the value is None.
I have an update for this ready and can open a pull request.
Currently, the exists() method in FakeOpenSearch relies on getting a document type that is used alongside the index and document id when checking if a document exists. If a document type is not input, it defaults to None and will return false because it checks, for example, if the document type "_doc" == None.
The opensearchpy implementation does not need a document type input and only needs the index name and document id to check for the existence of the document. In openmock, the exists method should ignore whether the document type matches when the value is None.
I have an update for this ready and can open a pull request.