Skip to content

Commit 719445c

Browse files
committed
test: Add test for numeric comparison with category field
Tests CoherenceFilterExpressionConverter handling of greater-than-or-equal Co-authored-by: Oleksandr Klymenko <[email protected]> Signed-off-by: Oleksandr Klymenko <[email protected]>
1 parent a15b495 commit 719445c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

vector-stores/spring-ai-coherence-store/src/test/java/org/springframework/ai/vectorstore/coherence/CoherenceFilterExpressionConverterTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,10 @@ void testNINWithSingleValue() {
141141
assertThat(CONVERTER.convert(e)).isEqualTo(Filters.not(Filters.in(extractor("category"), "inactive")));
142142
}
143143

144+
@Test
145+
void testCategoryWithNumericComparison() {
146+
final Expression e = new FilterExpressionTextParser().parse("categoryId >= 5");
147+
assertThat(CONVERTER.convert(e)).isEqualTo(Filters.greaterEqual(extractor("categoryId"), 5));
148+
}
149+
144150
}

0 commit comments

Comments
 (0)