to be associated with the current date and time, you do not need to create a list of ids. A uuid will be automatically generated for each document.If you want your documents to be associated with a past date and time, you can create a list of ids using the uuid_from_time function in the timecale-vector python library, as shown in Section 2 above. This function takes a datetime object and returns a uuid with the date and time encoded in the uuid.# Add documents to a collection in TimescaleVectorids = vectorstore.add_documents([Document(page_content="foo")])ids    ['a34f2b8a-53d7-11ee-8cc3-de1e4b2a0118']# Query the vectorstore for similar documentsdocs_with_score = vectorstore.similarity_search_with_score("foo")docs_with_score[0]    (Document(page_content='foo', metadata={}), 5.006789860928507e-06)docs_with_score[1]    (Document(page_content='{"commit": " 00b566dfe478c11134bcf1e7bcf38943e7fafe8f", "author": "Fabr\\u00edzio de Royes Mello<fabriziomello@gmail.com>", "date": "Mon Mar 6 15:51:03 2023 -0300", "change summary": "Remove unused functions", "change details": "We don\'t use `ts_catalog_delete[_only]` functions anywhere and instead we rely on `ts_catalog_delete_tid[_only]` functions so removing it from our code base. "}', metadata={'id': 'd7f5c580-bc4f-11ed-9712-ffa0126a201a', 'date': '2023-03-6 15:51:03+-500', 'source': '/Users/avtharsewrathan/sideprojects2023/timescaleai/tsv-langchain/langchain/docs/docs/modules/ts_git_log.json', 'seq_num': 285, 'author_name': 'Fabr√≠zio de Royes Mello', 'commit_hash': ' 00b566dfe478c11134bcf1e7bcf38943e7fafe8f', 'author_email': 'fabriziomello@gmail.com'}),     0.23607668446580354)Deleting Data‚ÄãYou can delete data by uuid or by a filter on the metadata.ids = vectorstore.add_documents([Document(page_content="Bar")])vectorstore.delete(ids)    TrueDeleting using metadata is especially useful if you want to periodically update information scraped from a particular source, or particular date or some other metadata
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries.
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries. ->: to be associated with the current date and time, you do not need to create a list of ids. A uuid will be automatically generated for each document.If you want your documents to be associated with a past date and time, you can create a list of ids using the uuid_from_time function in the timecale-vector python library, as shown in Section 2 above. This function takes a datetime object and returns a uuid with the date and time encoded in the uuid.# Add documents to a collection in TimescaleVectorids = vectorstore.add_documents([Document(page_content="foo")])ids    ['a34f2b8a-53d7-11ee-8cc3-de1e4b2a0118']# Query the vectorstore for similar documentsdocs_with_score = vectorstore.similarity_search_with_score("foo")docs_with_score[0]    (Document(page_content='foo', metadata={}), 5.006789860928507e-06)docs_with_score[1]    (Document(page_content='{"commit": " 00b566dfe478c11134bcf1e7bcf38943e7fafe8f", "author": "Fabr\\u00edzio de Royes Mello<fabriziomello@gmail.com>", "date": "Mon Mar 6 15:51:03 2023 -0300", "change summary": "Remove unused functions", "change details": "We don\'t use `ts_catalog_delete[_only]` functions anywhere and instead we rely on `ts_catalog_delete_tid[_only]` functions so removing it from our code base. "}', metadata={'id': 'd7f5c580-bc4f-11ed-9712-ffa0126a201a', 'date': '2023-03-6 15:51:03+-500', 'source': '/Users/avtharsewrathan/sideprojects2023/timescaleai/tsv-langchain/langchain/docs/docs/modules/ts_git_log.json', 'seq_num': 285, 'author_name': 'Fabr√≠zio de Royes Mello', 'commit_hash': ' 00b566dfe478c11134bcf1e7bcf38943e7fafe8f', 'author_email': 'fabriziomello@gmail.com'}),     0.23607668446580354)Deleting Data‚ÄãYou can delete data by uuid or by a filter on the metadata.ids = vectorstore.add_documents([Document(page_content="Bar")])vectorstore.delete(ids)    TrueDeleting using metadata is especially useful if you want to periodically update information scraped from a particular source, or particular date or some other metadata