|
14 | 14 | from haystack.dataclasses.byte_stream import ByteStream |
15 | 15 | from haystack.document_stores.types import DuplicatePolicy |
16 | 16 | from haystack.testing.document_store import ( |
| 17 | + CountDocumentsByFilterTest, |
17 | 18 | CountDocumentsTest, |
| 19 | + CountUniqueMetadataByFilterTest, |
18 | 20 | DeleteAllTest, |
19 | 21 | DeleteByFilterTest, |
20 | 22 | DeleteDocumentsTest, |
21 | 23 | FilterableDocsFixtureMixin, |
| 24 | + GetMetadataFieldMinMaxTest, |
| 25 | + GetMetadataFieldsInfoTest, |
| 26 | + GetMetadataFieldUniqueValuesTest, |
22 | 27 | UpdateByFilterTest, |
23 | 28 | WriteDocumentsTest, |
24 | 29 | create_filterable_docs, |
25 | | - CountDocumentsByFilterTest, |
26 | | - CountUniqueMetadataByFilterTest, |
27 | | - GetMetadataFieldsInfoTest, |
28 | | - GetMetadataFieldMinMaxTest, |
29 | | - GetMetadataFieldUniqueValuesTest, |
30 | 30 | ) |
31 | 31 | from haystack.utils import Secret |
32 | 32 |
|
@@ -74,6 +74,8 @@ def document_store(self): |
74 | 74 | "quality": str, |
75 | 75 | "year": int, |
76 | 76 | "featured": int, # for base-class test_update_by_filter_advanced_filters (meta.featured) |
| 77 | + "rating": float, # for GetMetadataFieldMinMaxTest (float field) |
| 78 | + "age": int, # for GetMetadataFieldMinMaxTest meta_prefix test |
77 | 79 | # for base-class UpdateByFilterTest.filterable_docs and filter tests: |
78 | 80 | "name": str, |
79 | 81 | "page": str, |
@@ -104,6 +106,10 @@ def test_write_documents(self, document_store): |
104 | 106 | assert document_store.write_documents(docs) == 1 |
105 | 107 | assert document_store.count_documents() == 1 |
106 | 108 |
|
| 109 | + def test_get_metadata_fields_info_empty_collection(self, document_store): |
| 110 | + """Valkey pre-configures metadata fields at init, so they're always present even when empty.""" |
| 111 | + pytest.skip("Valkey metadata fields are pre-configured at init, not discovered from documents") |
| 112 | + |
107 | 113 | def test_write_documents_duplicate_fail(self, document_store): |
108 | 114 | """Valkey only supports OVERWRITE policy, skip FAIL test.""" |
109 | 115 | pytest.skip("Valkey only supports DuplicatePolicy.OVERWRITE") |
|
0 commit comments