llama-index-vector-stores-postgres 0.6.2__tar.gz → 0.6.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/PKG-INFO +1 -1
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/llama_index/vector_stores/postgres/base.py +7 -4
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/pyproject.toml +1 -1
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/.gitignore +0 -0
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/LICENSE +0 -0
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/README.md +0 -0
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/llama_index/py.typed +0 -0
- {llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/llama_index/vector_stores/postgres/__init__.py +0 -0
|
@@ -873,8 +873,11 @@ class PGVectorStore(BasePydanticVectorStore):
|
|
|
873
873
|
if query_str is None:
|
|
874
874
|
raise ValueError("query_str must be specified for a sparse vector query.")
|
|
875
875
|
|
|
876
|
-
# Remove
|
|
877
|
-
query_str = re.sub(r"
|
|
876
|
+
# Remove special characters used by ts_query
|
|
877
|
+
query_str = re.sub(r"[&|!:*()'<>]", " ", query_str)
|
|
878
|
+
|
|
879
|
+
# Collapse multiple spaces
|
|
880
|
+
query_str = re.sub(r"\s+", " ", query_str).strip()
|
|
878
881
|
|
|
879
882
|
# Replace space with "|" to perform an OR search for higher recall
|
|
880
883
|
query_str = query_str.replace(" ", "|")
|
|
@@ -1067,7 +1070,7 @@ class PGVectorStore(BasePydanticVectorStore):
|
|
|
1067
1070
|
self._initialize()
|
|
1068
1071
|
with self._session() as session, session.begin():
|
|
1069
1072
|
stmt = delete(self._table_class).where(
|
|
1070
|
-
self._table_class.metadata_["
|
|
1073
|
+
self._table_class.metadata_["ref_doc_id"].astext == ref_doc_id
|
|
1071
1074
|
)
|
|
1072
1075
|
|
|
1073
1076
|
session.execute(stmt)
|
|
@@ -1079,7 +1082,7 @@ class PGVectorStore(BasePydanticVectorStore):
|
|
|
1079
1082
|
self._initialize()
|
|
1080
1083
|
async with self._async_session() as session, session.begin():
|
|
1081
1084
|
stmt = delete(self._table_class).where(
|
|
1082
|
-
self._table_class.metadata_["
|
|
1085
|
+
self._table_class.metadata_["ref_doc_id"].astext == ref_doc_id
|
|
1083
1086
|
)
|
|
1084
1087
|
|
|
1085
1088
|
await session.execute(stmt)
|
{llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/pyproject.toml
RENAMED
|
@@ -27,7 +27,7 @@ dev = [
|
|
|
27
27
|
|
|
28
28
|
[project]
|
|
29
29
|
name = "llama-index-vector-stores-postgres"
|
|
30
|
-
version = "0.6.
|
|
30
|
+
version = "0.6.4"
|
|
31
31
|
description = "llama-index vector_stores postgres integration"
|
|
32
32
|
authors = [{name = "Your Name", email = "you@example.com"}]
|
|
33
33
|
requires-python = ">=3.9,<4.0"
|
{llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/.gitignore
RENAMED
|
File without changes
|
{llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/LICENSE
RENAMED
|
File without changes
|
{llama_index_vector_stores_postgres-0.6.2 → llama_index_vector_stores_postgres-0.6.4}/README.md
RENAMED
|
File without changes
|
|
File without changes
|