Introduction
OpenSearch Vector Search Edition provides an SQL development feature to compile, develop, and test SQL statements. It includes basic IDE features such as syntax highlighting, auto-completion, and parameter settings.
Procedure
-
Log on to the OpenSearch Console. In the upper-left corner, switch to OpenSearch Vector Search Edition. On the Instance Management page, find your instance in the list and click Manage in the Actions column.
-
In the left-side navigation pane, choose Feature Extensions > SQL development. The Vector Search Edition - SQL development tab contains three groups: SQL Instances, Table Details, and Function.
-
Create an SQL instance script. Click the button to the right of SQL Instances and select New SQL Instance.
Enter a name for the SQL instance, and then click OK. The system automatically generates an SQL instance script.
-
Write the script. In the editor for the new SQL instance script, you can edit, format, and run SQL queries.
You can view or download the results in the list at the bottom of the page. You can also view the run log and the query statement.
The query result table includes columns such as productid, price, description, and vector_id. The vector_id column displays high-dimensional vector embedding data.
Query syntax
For more information, see Query syntax.
Notes
-
SQL Instances: You can create a New SQL Instance or a New Folder. In the SQL development directory tree, click the ⋮ icon next to the SQL Instances node and select New SQL Instance or New Folder.
-
You can Rename, Copy, and Delete SQL scripts. Click the three-dot (⋮) icon next to an SQL instance name to Rename, Copy, or Delete it.
-
SQL scripts support operations such as Save, Run, Reload, Format, and Parameter Settings (related to the kvpair clause). In the SQL development interface, click Parameter Settings to open the global parameters (kvpair) dialog box. You can configure the following parameters: databaseName (database name, e.g.,
general), formatType (format type, e.g.,string), timeout(ms) (timeout, e.g.,1000), trace (log level, e.g.,INFO), iquan.plan.cache.enable (plan cache switch, e.g.,true), iquan.plan.prepare.level (plan preparation level, e.g.,jni.post.optimize), and urlencode_data (URL encoding switch, e.g.,false). Click the + button at the bottom to add custom parameters. After you complete the configuration, click OK to save the settings. -
In a newly created SQL script, you can write, run, and test SQL queries.
-
Table Details lists the names of index tables in the current cluster.
-
Function provides links to Instructions for available functions.
-
SELECT statements cannot retrieve fields whose field type is date, time, or timestamp.