Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es-alchemy

Package Overview
Dependencies
Maintainers
1
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-alchemy - npm Package Compare versions

Comparing version 8.7.6 to 8.7.7

2

lib/util/rest/rest.js

@@ -112,3 +112,3 @@ "use strict";

validateStatus: () => true,
url: [`${get(options, 'protocol', 'http')}:/`, get(options, 'endpoint', 'elasticsearch:9200'), idx.replace(/@/g, '%40').replace(/,/g, '%2C'), endpoint].filter(e => e !== '').join('/'),
url: [`${get(options, 'protocol', 'http')}:/`, get(options, 'endpoint', 'opensearch:9200'), idx.replace(/@/g, '%40').replace(/,/g, '%2C'), endpoint].filter(e => e !== '').join('/'),
data: body,

@@ -115,0 +115,0 @@ headers: requestHeaders

{
"name": "es-alchemy",
"version": "8.7.6",
"description": "Simplification of Elasticsearch interactions",
"version": "8.7.7",
"description": "Simplification of Opensearch interactions",
"main": "lib/index.js",

@@ -29,2 +29,3 @@ "scripts": {

"elasticsearch",
"opensearch",
"abstraction",

@@ -48,3 +49,3 @@ "simplification",

"@blackflux/eslint-plugin-rules": "2.0.4",
"@blackflux/robo-config-plugin": "5.3.7",
"@blackflux/robo-config-plugin": "5.3.8",
"babel-eslint": "10.1.0",

@@ -51,0 +52,0 @@ "babel-preset-latest-node": "5.5.1",

@@ -12,3 +12,3 @@ # ESAlchemy

Simplification of Elasticsearch interactions
Simplification of Opensearch interactions

@@ -27,7 +27,7 @@ ## Install

- Define indices based on the data models
- Generate (versioned) schemas for indices, create them in Elasticsearch and alias them for querying
- Generate (versioned) schemas for indices, create them in Opensearch and alias them for querying
- Obtain input data as defined in the source mappings of index and remap it
- Insert remapped data into Elasticsearch
- Insert remapped data into Opensearch
- Build a query using the ES-Alchemy query syntax
- Run query against Elasticsearch
- Run query against Opensearch
- Map result to simplified representation with paging information

@@ -59,3 +59,3 @@

Fields that can be used and how they get mapped in Elasticsearch can
Fields that can be used and how they get mapped in Opensearch can
be found [here](src/resources/field-definitions.js).

@@ -107,3 +107,3 @@

Elasticsearch [index settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings). Can only be defined top level.
Opensearch [index settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings). Can only be defined top level.

@@ -168,4 +168,4 @@ ##### version

This flag sets `include_in_root` to true on the generated Elasticsearch mapping.
Internally in Elasticsearch this means all fields get flattened into the root document of the mapping.
This flag sets `include_in_root` to true on the generated Opensearch mapping.
Internally in Opensearch this means all fields get flattened into the root document of the mapping.

@@ -198,3 +198,3 @@ This is useful to reduce storage size by de-duplicating and to enforce

To (re)create a mapping in Elasticsearch run:
To (re)create a mapping in Opensearch run:

@@ -210,4 +210,4 @@ ```js

To insert data into Elasticsearch we need a *source object*. Data is then extracted from this source object
and remapped into a *target object* that can be ingested into Elasticsearch.
To insert data into Opensearch we need a *source object*. Data is then extracted from this source object
and remapped into a *target object* that can be ingested into Opensearch.

@@ -241,3 +241,3 @@ To define how the source object gets remapped, the `sources` fields in the nodes of the index are used.

To query data in Elasticsearch we first need to build a query. This is done using the ESAlchemy query syntax.
To query data in Opensearch we first need to build a query. This is done using the ESAlchemy query syntax.

@@ -308,3 +308,3 @@ List of all available commands for `filterBy`, `orderBy` and `scoreBy` can be found [here](src/resources/action-map.js).

The protocol for connecting to Elasticsearch. Can be `http` or `https`.
The protocol for connecting to Opensearch. Can be `http` or `https`.

@@ -314,5 +314,5 @@ #### endpoint

Type: `string`<br>
Default: `elasticsearch:9200`
Default: `opensearch:9200`
The endpoint for connecting to Elasticsearch. Common values include `localhost:9200`.
The endpoint for connecting to Opensearch. Common values include `localhost:9200`.

@@ -324,3 +324,3 @@ #### aws

Allow connection to AWS Elasticsearch instance by passing
Allow connection to AWS Opensearch instance by passing
in object containing `accessKeyId` and `secretAccessKey`.

@@ -386,3 +386,3 @@

- `list()` - list all indices registered with ES-Alchemy
- `getMapping(name: String)` - get the mapping for Elasticsearch for this index
- `getMapping(name: String)` - get the mapping for Opensearch for this index
- `getFields(name: String)` - get all fields (including nested) for this index

@@ -401,22 +401,22 @@

Interacting with the rest api of Elasticsearch
Interacting with the rest api of Opensearch
- `call(method: String, name: String, options: Object)` - make direct API call to Elasticsearch
- `call(method: String, name: String, options: Object)` - make direct API call to Opensearch
- `alias.get(name: String)` - return the index version for alias
- `alias.update(name: String)` - update alias for index, linking to current index version
- `alias.updated(name: String)` - returns true if alias points to current index version
- `mapping.apply(index: String)` - Creates tracked (known) indices in Elasticsearch when missing
- `mapping.apply(index: String)` - Creates tracked (known) indices in Opensearch when missing
- `mapping.applied(index: String)` - returns true if every local versions exists remotely
- `mapping.create(name: String)` - create mapping on Elasticsearch (call when version changes)
- `mapping.delete(name: String)` - delete mapping from Elasticsearch (deletes _all_ versions)
- `mapping.create(name: String)` - create mapping on Opensearch (call when version changes)
- `mapping.delete(name: String)` - delete mapping from Opensearch (deletes _all_ versions)
- `mapping.exists(name: String)` - returns `true` if latest mapping exists
- `mapping.get(name: String)` - get mapping details from Elasticsearch (against alias)
- `mapping.list()` - Lists all mappings currently in Elasticsearch
- `mapping.prune(index: String)` - Removes index versions from Elasticsearch that are not tracked (unknown)
- `mapping.get(name: String)` - get mapping details from Opensearch (against alias)
- `mapping.list()` - Lists all mappings currently in Opensearch
- `mapping.prune(index: String)` - Removes index versions from Opensearch that are not tracked (unknown)
- `mapping.pruned(index: String)` - returns true if all remote versions exist locally
- `mapping.recreate(name: String)` - recreate mapping on Elasticsearch (deletes _all_ versions and recreates current version)
- `mapping.recreate(name: String)` - recreate mapping on Opensearch (deletes _all_ versions and recreates current version)
- `data.count(name: String, filter: Object = null)` - get number of indexed elements from alias
- `data.exists(index: String, id: String)` - check if document exists in any index version
- `data.query(name: String, filter: Object, options: Object)` - query for data in Elasticsearch against alias. Returns raw result body from elasticsearch.
- `data.refresh(name: String)` - refresh Elasticsearch index, useful e.g. when testing (all versions)
- `data.query(name: String, filter: Object, options: Object)` - query for data in Opensearch against alias. Returns raw result body from Opensearch.
- `data.refresh(name: String)` - refresh Opensearch index, useful e.g. when testing (all versions)
- `data.signature(index: String, id: String)` - get signature as `${_seq_no}_${_primary_term}_${idx}@${version}` in alias for document or `null_${idx}@${version}` if document does not exist

@@ -426,3 +426,3 @@ - `data.stats()` - returns all the statistics for the nodes in a cluster like: indices, cpu usage and other meta

- `data.uniques(index: String, fields: String[] || String, opts = { filterBy = {}, limit = 20, cursor = null, count = boolean })` - get unique values from index for field, using filter. When count true, the counts per unique are returned
- `data.update(options: Object)` - update or delete documents in Elasticsearch (all index versions)
- `data.update(options: Object)` - update or delete documents in Opensearch (all index versions)
- `data.version(index: String, id: String)` - get version number in alias for document or null if document does not exist

@@ -439,6 +439,6 @@

To test Elasticsearch works correctly, run
To test Opensearch works correctly, run
```bash
curl http://elasticsearch:9200/_cluster/health
curl http://opensearch:9200/_cluster/health
```

@@ -445,0 +445,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc