Bug description
PineconeFilterExpressionConverter builds Pinecone metadata-filter operators by lowercasing the Filter.ExpressionType enum name without specifying a Locale:
private String getOperationSymbol(Expression exp) {
return "\"$" + exp.type().toString().toLowerCase() + "\": ";
}
exp.type().toString() is always the uppercase enum constant. On a JVM running the Turkish locale (tr_TR), "IN".toLowerCase() returns "ın" (dotless ı) and "NIN".toLowerCase() returns "nın", so the converter emits "$ın" / "$nın" instead of "$in" / "$nin". These are not valid Pinecone operators, so any metadata filter using IN / NIN fails on Turkish-locale JVMs.
Environment
- Spring AI:
main (2.0.0-SNAPSHOT); the pattern also exists in 1.x
- JVM locale:
tr_TR
Steps to reproduce
Run with -Duser.language=tr -Duser.country=TR and convert an IN filter:
new PineconeFilterExpressionConverter()
.convertExpression(new Expression(IN, new Key("genre"), new Value(List.of("comedy", "drama"))));
// expected: {"genre": {"$in": ["comedy","drama"]}}
// actual: {"genre": {"$ın": ["comedy","drama"]}}
Expected behavior
Operator symbols are protocol tokens and must be locale-independent. The conversion should use Locale.ROOT.
Related
Same bug class as #5340 (Gemini tool type normalization) and #6476 / #6477 (OpenAI protocol values). This is a different, unreported code path in spring-ai-vector-store.
Bug description
PineconeFilterExpressionConverterbuilds Pinecone metadata-filter operators by lowercasing theFilter.ExpressionTypeenum name without specifying aLocale:exp.type().toString()is always the uppercase enum constant. On a JVM running the Turkish locale (tr_TR),"IN".toLowerCase()returns"ın"(dotless ı) and"NIN".toLowerCase()returns"nın", so the converter emits"$ın"/"$nın"instead of"$in"/"$nin". These are not valid Pinecone operators, so any metadata filter usingIN/NINfails on Turkish-locale JVMs.Environment
main(2.0.0-SNAPSHOT); the pattern also exists in 1.xtr_TRSteps to reproduce
Run with
-Duser.language=tr -Duser.country=TRand convert anINfilter:Expected behavior
Operator symbols are protocol tokens and must be locale-independent. The conversion should use
Locale.ROOT.Related
Same bug class as #5340 (Gemini tool type normalization) and #6476 / #6477 (OpenAI protocol values). This is a different, unreported code path in
spring-ai-vector-store.