SQL examples for ODBC
The following SQL examples demonstrate common use cases for this connector. Select a scenario below to view the query syntax and parameters required to interact with ElasticSearch.
- Count documents in aliases
- Count documents in indexes
- Create a new index
- Delete an existing index
- Delete documents from index
- Generic API call
- Get index metadata
- Insert documents into index with _id autogenerated
- Insert documents into index with your own _id
- Insert documents using nested attribute and raw fragments (JSON sub-documents, arrays)
- Insert documents using various data types
- Insert raw document (_rawdoc_ usage)
- List indexes
- Read documents from alias (all or with filter)
- Read documents from index (all or with filter)
- Search documents from alias
- Search documents from index
- Update array or sub document
- Update documents in index
- Update documents using various data types
- Update raw document (_rawdoc_ usage)
- Upsert (Update or Insert) documents using various data types (supply _id)
- Using JSON Array / Value functions