es8的in语法转换问题
ElasticsearchAiSearchFilterExpressionConverterTest
测试用例
@Test
public void tesIn() {
String vectorExpr = this.converter.convertExpression(
new Filter.Expression(IN, new Filter.Key("genre"), new Filter.Value(List.of("comedy", "documentary", "drama")))
);
// assertThat(vectorExpr).isEqualTo("(metadata.genre:comedy OR documentary OR drama)"); assertThat(vectorExpr).isEqualTo("metadata.genre:(comedy OR documentary OR drama)"); }
这对对于in语法的处理好像有问题吧?
I've found that the IN operator in ElasticsearchAiSearchFilterExpressionConverter generates incorrect Lucene syntax. Currently, it produces (field:val1 OR val2) but it should be field:(val1 OR val2) to correctly group the values for the specific field. I'd like to fix this and add a test case for it. Can I take this issue?
This looks resolved: 3d68ffc8e ("GH-5297: Fix Elasticsearch IN/NIN expression grouping syntax"), released in 2.0.0-M3, makes the converter produce metadata.genre:("comedy" OR "documentary" OR "drama"), which ElasticsearchAiSearchFilterExpressionConverterTest#testIn checks. Could this issue be closed?