@@ -439,8 +439,9 @@ limitations under the License.
439
439
- 29.2 [ Creating SODA Collections] ( #creatingsodacollections )
440
440
- 29.3 [ Creating and Accessing SODA documents] ( #accessingsodadocuments )
441
441
- 29.4 [ SODA Query-by-Example Searches for JSON Documents] ( #sodaqbesearches )
442
- - 29.5 [ SODA Client-Assigned Keys and Collection Metadata] ( #sodaclientkeys )
443
- - 29.6 [ JSON Data Guides in SODA] ( #sodajsondataguide )
442
+ - 29.5 [ SODA Text Searches] ( #sodatextsearches )
443
+ - 29.6 [ SODA Client-Assigned Keys and Collection Metadata] ( #sodaclientkeys )
444
+ - 29.7 [ JSON Data Guides in SODA] ( #sodajsondataguide )
444
445
30 . [ Tracing SQL and PL/SQL Statements] ( #tracingsql )
445
446
31 . [ Node.js Programming Styles and node-oracledb] ( #programstyles )
446
447
- 31.1 [ Callbacks and node-oracledb] ( #callbackoverview )
@@ -12945,7 +12946,31 @@ Some QBE examples are:
12945
12946
12946
12947
See [Overview of QBE Spatial Operators][111].
12947
12948
12948
- ### <a name="sodaclientkeys"></a> 29.5 SODA Client-Assigned Keys and Collection Metadata
12949
+ ### <a name="sodatextsearches"></a> 29.5 SODA Text Searches
12950
+
12951
+ To perform text searches through documents, a [JSON search index][149]
12952
+ must be defined. For example::
12953
+
12954
+ ` ` ` javascript
12955
+ await collection .createIndex ({ name : " mySearchIdx" );
12956
+ ` ` `
12957
+
12958
+ See [SODA Index Specifications (Reference)][119] for information on
12959
+ SODA indexing.
12960
+
12961
+ Documents in the indexed collection can be searched by running a
12962
+ filter (QBE) using the [` $contains` ][148] operator:
12963
+
12964
+ ` ` ` javascript
12965
+ let documents = await collection .find ().filter ({item : { $contains : " books" }}).getDocuments ();
12966
+ ` ` `
12967
+
12968
+ This example will find all documents that have an ` item` field
12969
+ containing the string "books" (case-insensitive). For example, a
12970
+ document that contained ` {item : " Books by Brothers Grimm" }` would be
12971
+ returned.
12972
+
12973
+ ### <a name="sodaclientkeys"></a> 29.6 SODA Client-Assigned Keys and Collection Metadata
12949
12974
12950
12975
Default collections support JSON documents and use system generated
12951
12976
document keys. Various storage options are also configured which
@@ -13072,7 +13097,7 @@ try {
13072
13097
}
13073
13098
` ` `
13074
13099
13075
- ### <a name="sodajsondataguide"></a> 29.6 JSON Data Guides in SODA
13100
+ ### <a name="sodajsondataguide"></a> 29.7 JSON Data Guides in SODA
13076
13101
13077
13102
SODA exposes Oracle Database's [JSON data guide][116] feature. This
13078
13103
lets you discover information about the structure and content of JSON
@@ -13680,3 +13705,5 @@ All exceptions are now passed through the error callback.
13680
13705
[145]: https://github.com/oracle/node-oracledb/tree/master/examples/aqmulti.js
13681
13706
[146]: https://github.com/oracle/node-oracledb/tree/master/examples/selectvarray.js
13682
13707
[147]: https://github.com/oracle/node-oracledb/tree/master/examples/plsqlrecord.js
13708
+ [148]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-C4C426FC-FD23-4B2E-8367-FA5F83F3F23A
13709
+ [149]: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-4848E6A0-58A7-44FD-8D6D-A033D0CCF9CB
0 commit comments