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:14 UTC
[solr] branch main 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 main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 01233753e0c SOLR-9661 added missing operations[withField,withValue] for expression on stream operations (#934)
01233753e0c is described below
commit 01233753e0ce7ad814226abefe94293c01dce8f1
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 56df438c600..ce3d825633f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -102,6 +102,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",