@@ -10,31 +10,22 @@ replace
1010
1111
1212Description
13- ============
14- Using ``replace `` command to replace text in one or more fields in the search result.
15-
16- Note: This command is only available when Calcite engine is enabled.
13+ ===========
14+ The ``replace `` replaces text in one or more fields in the search result.
1715
1816
1917Syntax
20- ============
18+ ======
2119replace '<pattern>' WITH '<replacement>' [, '<pattern>' WITH '<replacement>']... IN <field-name>[, <field-name>]...
2220
23-
24- Parameters
25- ==========
26- * **pattern **: mandatory. The text pattern you want to replace. Currently supports only plain text literals (no wildcards or regular expressions).
27- * **replacement **: mandatory. The text you want to replace with.
28- * **field-name **: mandatory. One or more field names where the replacement should occur.
29-
30-
31- Examples
32- ========
21+ * pattern: mandatory. The text pattern you want to replace. Currently supports only plain text literals (no wildcards or regular expressions).
22+ * replacement: mandatory. The text you want to replace with.
23+ * field-name: mandatory. One or more field names where the replacement should occur.
3324
3425Example 1: Replace text in one field
35- ------------------------------------
26+ ====================================
3627
37- The example shows replacing text in one field.
28+ This example shows replacing text in one field.
3829
3930PPL query::
4031
@@ -51,9 +42,9 @@ PPL query::
5142
5243
5344Example 2: Replace text in multiple fields
54- ------------------------------------
45+ ==========================================
5546
56- The example shows replacing text in multiple fields.
47+ This example shows replacing text in multiple fields.
5748
5849PPL query::
5950
@@ -70,9 +61,9 @@ PPL query::
7061
7162
7263Example 3: Replace with other commands in a pipeline
73- ------------------------------------
64+ ====================================================
7465
75- The example shows using replace with other commands in a query pipeline.
66+ This example shows using replace with other commands in a query pipeline.
7667
7768PPL query::
7869
@@ -87,9 +78,9 @@ PPL query::
8778 +----------+-----+
8879
8980Example 4: Replace with multiple pattern/replacement pairs
90- ------------------------------------
81+ ==========================================================
9182
92- The example shows using multiple pattern/replacement pairs in a single replace command. The replacements are applied sequentially.
83+ This example shows using multiple pattern/replacement pairs in a single replace command. The replacements are applied sequentially.
9384
9485PPL query::
9586
@@ -105,7 +96,7 @@ PPL query::
10596 +-----------+
10697
10798Example 5: Pattern matching with LIKE and replace
108- ------------------------------------
99+ =================================================
109100
110101Since replace command only supports plain string literals, you can use LIKE command with replace for pattern matching needs.
111102
0 commit comments