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

elastic-dsl-typescript

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elastic-dsl-typescript - npm Package Compare versions

Comparing version 1.6.2 to 1.7.0

dist/Builders/FunctionScore/index.d.ts

6

CHANGELOG.md

@@ -1,6 +0,6 @@

## [1.6.2](https://github.com/Blynskyniki/elastic-query-builder/compare/v1.6.1...v1.6.2) (2022-12-08)
# [1.7.0](https://github.com/Blynskyniki/elastic-query-builder/compare/v1.6.2...v1.7.0) (2023-02-28)
### Bug Fixes
### Features
* renamed default operator field ([23f8233](https://github.com/Blynskyniki/elastic-query-builder/commit/23f823322b8cebd8e788b0921a6e00f74e3b2c13))
* Function Score ([f212aa9](https://github.com/Blynskyniki/elastic-query-builder/commit/f212aa98b98b7c9b4e2cac66beecc608e735ab6c))

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

add(type, filter, data) {
var _a, _b, _c;
var _a, _b, _c, _d;
this.checkField(type);

@@ -70,2 +70,8 @@ switch (filter) {

}
case 'match_all': {
(_c = this._query[type]) === null || _c === void 0 ? void 0 : _c.push({
[filter]: {},
});
break;
}
default: {

@@ -76,3 +82,3 @@ let payload = Object.assign({}, data.params);

}
(_c = this._query[type]) === null || _c === void 0 ? void 0 : _c.push({
(_d = this._query[type]) === null || _d === void 0 ? void 0 : _d.push({
[filter]: { [data['field']]: payload },

@@ -79,0 +85,0 @@ });

@@ -15,3 +15,5 @@ export * from './Query';

export * from './Builders/EshopFacets';
export * from './Builders/FunctionScore/index';
export * from './Builders/FunctionScore/types';
export * from './Types/index';
export * from './Types/QueryOptions';

@@ -39,3 +39,6 @@ "use strict";

__exportStar(require("./Builders/EshopFacets"), exports);
// FunctionScore
__exportStar(require("./Builders/FunctionScore/index"), exports);
__exportStar(require("./Builders/FunctionScore/types"), exports);
__exportStar(require("./Types/index"), exports);
__exportStar(require("./Types/QueryOptions"), exports);

@@ -47,3 +47,16 @@ "use strict";

addQuery(type, val) {
this._query[type] = val;
switch (type) {
case 'function_score': {
this._query = Object.assign(Object.assign({}, this._query), val.build());
break;
}
case 'match_all': {
this._query[type] = {};
break;
}
default: {
this._query[type] = val;
break;
}
}
return this;

@@ -50,0 +63,0 @@ }

@@ -0,1 +1,2 @@

import { FunctionScore } from 'Builders/FunctionScore';
import { AggregationSchema, EshopFacets } from '..';

@@ -29,2 +30,3 @@ import { Aggregation } from '../Builders/Aggregation';

bool?: Bool<BoolSchema>;
function_score?: FunctionScore;
match_all?: {

@@ -39,2 +41,3 @@ boost: number;

};
[key: string]: any;
};

@@ -41,0 +44,0 @@ /**

{
"name": "elastic-dsl-typescript",
"version": "1.6.2",
"version": "1.7.0",
"description": "Node.js ElasticSearch search query builder",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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