You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: Those (portable) filter expressions get automatically converted into the proprietary GemFire VectorDB query format.
174
+
175
+
For example, this portable filter expression:
176
+
177
+
[source,sql]
178
+
----
179
+
country == 'BG' && year >= 2020
180
+
----
181
+
182
+
is converted into the proprietary GemFire VectorDB filter format:
183
+
184
+
----
185
+
country:BG AND year:[2020 TO *]
186
+
----
187
+
188
+
The GemFire VectorStore supports a wide range of filter operations:
189
+
190
+
* **Equality**: `country == 'BG'` → `country:BG`
191
+
* **Inequality**: `city != 'Sofia'` → `city: NOT Sofia`
192
+
* **Greater Than**: `year > 2020` → `year:{2020 TO *]`
193
+
* **Greater Than or Equal**: `year >= 2020` → `year:[2020 TO *]`
194
+
* **Less Than**: `year < 2025` → `year:[* TO 2025}`
195
+
* **Less Than or Equal**: `year <= 2025` → `year:[* TO 2025]`
196
+
* **IN**: `country in ['BG', 'NL']` → `country:(BG OR NL)`
197
+
* **NOT IN**: `country nin ['BG', 'NL']` → `NOT country:(BG OR NL)`
198
+
* **AND/OR**: Logical operators for combining conditions
199
+
* **Grouping**: Use parentheses for complex expressions
200
+
* **Date Filtering**: Date values in ISO 8601 format (e.g., `2024-01-07T14:29:12Z`)
201
+
202
+
[IMPORTANT]
203
+
====
204
+
To use metadata filtering with GemFire VectorStore, you must specify the metadata fields that can be filtered when creating the vector store. This is done using the `fields` parameter in the builder:
0 commit comments