def test_add_documents_dupe_ids(self):
        """
        Only the latest added document is returned
        """

        # Add once to get vectors
        self.add_documents(
            config=self.config,
            add_docs_params=AddDocsParams(
                index_name=self.default_text_index, docs=[{
                    "_id": "1",
                    "title": "doc 123"
                }],
                device="cpu", tensor_fields=["title"]
            )
        )
        tensor_facets = tensor_search.get_document_by_id(
            config=self.config, index_name=self.default_text_index,
            document_id="1", show_vectors=True)['_tensor_facets']

        self.add_documents(
            config=self.config,
            add_docs_params=AddDocsParams(
                index_name=self.default_text_index, docs=[
                    {
                        "_id": "2",
                        "title": "doc 000"
                    }
                ],
                device="cpu", tensor_fields=["title"]
            )
        )
        self.add_documents(
            config=self.config,
            add_docs_params=AddDocsParams(
                index_name=self.default_text_index, docs=[
                    {
                        "_id": "2",
                        "title": "doc 123"
                    }
                ],
                device="cpu", tensor_fields=["title"]
            )
        )

        expected_doc = {
            "_id": "2",
            "title": "doc 123",
            '_tensor_facets': tensor_facets
        }
        actual_doc = tensor_search.get_document_by_id(
            config=self.config, index_name=self.default_text_index,
            document_id="2", show_vectors=True)

        self.assertEqual(expected_doc, actual_doc)

        Only the latest added document is returned
        
tests/integ_tests/tensor_search/integ_tests/test_add_documents_semi_structured.py