You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2022/07/09 22:54:49 UTC
[solr] branch branch_9x updated: SOLR-9661 added missing operations[withField,withValue] for expression on stream operations (#934)
This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 6f3cbd81fec SOLR-9661 added missing operations[withField,withValue] for expression on stream operations (#934)
6f3cbd81fec is described below
commit 6f3cbd81fecf3a6f15e556102ffd2d97aa5323e9
Author: Ahmet Can KEPENEK <ah...@gmail.com>
AuthorDate: Sun Jul 10 01:54:10 2022 +0300
SOLR-9661 added missing operations[withField,withValue] for expression on stream operations (#934)
* added missing operations[withField,withValue] to stream functions
Co-authored-by: epugh@opensourceconnections.com <ep...@opensourceconnections.com>
---
solr/CHANGES.txt | 2 ++
solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java | 4 ++++
solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java | 2 ++
3 files changed, 8 insertions(+)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 491f3d4be85..e97299f7988 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -78,6 +78,8 @@ Bug Fixes
* SOLR-16142: Fix Admin UI's spatial parameter generation. (Arsal Jalib, Christine Poerschke)
+* SOLR-9661: Fix explanation of select() streaming expression that uses replace() operation (Ahmet Can Kepenek via Eric Pugh)
+
Other Changes
---------------------
* SOLR-16245: Make DenseVectorField codec agnostic (Elia Porciani via Alessandro Benedetti)
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java
index cafa390bad5..4fffe69d0be 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Lang.java
@@ -28,6 +28,8 @@ import org.apache.solr.client.solrj.io.graph.ShortestPathStream;
import org.apache.solr.client.solrj.io.ops.DistinctOperation;
import org.apache.solr.client.solrj.io.ops.GroupOperation;
import org.apache.solr.client.solrj.io.ops.ReplaceOperation;
+import org.apache.solr.client.solrj.io.ops.ReplaceWithFieldOperation;
+import org.apache.solr.client.solrj.io.ops.ReplaceWithValueOperation;
import org.apache.solr.client.solrj.io.stream.*;
import org.apache.solr.client.solrj.io.stream.expr.Explanation;
import org.apache.solr.client.solrj.io.stream.expr.Expressible;
@@ -116,6 +118,8 @@ public class Lang {
// tuple manipulation operations
.withFunctionName("replace", ReplaceOperation.class)
+ .withFunctionName("withValue", ReplaceWithValueOperation.class)
+ .withFunctionName("withField", ReplaceWithFieldOperation.class)
// stream reduction operations
.withFunctionName("group", GroupOperation.class)
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java
index 6b95f4663cf..0417a4721d5 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/TestLang.java
@@ -103,6 +103,8 @@ public class TestLang extends SolrTestCase {
"sum",
"count",
"replace",
+ "withValue",
+ "withField",
"concat",
"group",
"distinct",