Socket
Socket
Sign inDemoInstall

elastic-builder

Package Overview
Dependencies
11
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.13.0 to 2.14.0

81

lib/queries/term-level-queries/wildcard-query.js

@@ -52,35 +52,11 @@ 'use strict';

/**
* Sets the rewrite method. Valid values are:
* - `constant_score` - tries to pick the best constant-score rewrite
* method based on term and document counts from the query.
* Synonyms - `constant_score_auto`, `constant_score_filter`
* Allow case insensitive matching or not (added in 7.10.0).
* Defaults to false.
*
* - `scoring_boolean` - translates each term into boolean should and
* keeps the scores as computed by the query
* @example
* const qry = esb.wildcardQuery('user', 'ki*y')
* .caseInsensitive(true);
*
* - `constant_score_boolean` - same as `scoring_boolean`, expect no scores
* are computed.
*
* - `constant_score_filter` - first creates a private Filter, by visiting
* each term in sequence and marking all docs for that term
*
* - `top_terms_boost_N` - first translates each term into boolean should
* and scores are only computed as the boost using the top N
* scoring terms. Replace N with an integer value.
*
* - `top_terms_N` - first translates each term into boolean should
* and keeps the scores as computed by the query. Only the top N
* scoring terms are used. Replace N with an integer value.
*
* Default is `constant_score`.
*
* This is an advanced option, use with care.
*
* Note: The deprecated multi term rewrite parameters `constant_score_auto`,
* `constant_score_filter` (synonyms for `constant_score`) have been removed
* in elasticsearch 6.0.
*
* @param {string} method The rewrite method as a string.
* @returns {WildcardQuery} returns `this` so that calls can be chained.
* @throws {Error} If the given `rewrite` method is not valid.
* @param {boolean} caseInsensitive
* @returns {RegexpQuery} returns `this` so that calls can be chained.
*/

@@ -90,2 +66,45 @@

(0, _createClass3.default)(WildcardQuery, [{
key: 'caseInsensitive',
value: function caseInsensitive(_caseInsensitive) {
this._queryOpts.case_insensitive = _caseInsensitive;
return this;
}
/**
* Sets the rewrite method. Valid values are:
* - `constant_score` - tries to pick the best constant-score rewrite
* method based on term and document counts from the query.
* Synonyms - `constant_score_auto`, `constant_score_filter`
*
* - `scoring_boolean` - translates each term into boolean should and
* keeps the scores as computed by the query
*
* - `constant_score_boolean` - same as `scoring_boolean`, expect no scores
* are computed.
*
* - `constant_score_filter` - first creates a private Filter, by visiting
* each term in sequence and marking all docs for that term
*
* - `top_terms_boost_N` - first translates each term into boolean should
* and scores are only computed as the boost using the top N
* scoring terms. Replace N with an integer value.
*
* - `top_terms_N` - first translates each term into boolean should
* and keeps the scores as computed by the query. Only the top N
* scoring terms are used. Replace N with an integer value.
*
* Default is `constant_score`.
*
* This is an advanced option, use with care.
*
* Note: The deprecated multi term rewrite parameters `constant_score_auto`,
* `constant_score_filter` (synonyms for `constant_score`) have been removed
* in elasticsearch 6.0.
*
* @param {string} method The rewrite method as a string.
* @returns {WildcardQuery} returns `this` so that calls can be chained.
* @throws {Error} If the given `rewrite` method is not valid.
*/
}, {
key: 'rewrite',

@@ -92,0 +111,0 @@ value: function rewrite(method) {

{
"name": "elastic-builder",
"version": "2.13.0",
"version": "2.14.0",
"description": "A JavaScript implementation of the elasticsearch Query DSL",

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

@@ -29,2 +29,18 @@ 'use strict';

/**
* Allow case insensitive matching or not (added in 7.10.0).
* Defaults to false.
*
* @example
* const qry = esb.wildcardQuery('user', 'ki*y')
* .caseInsensitive(true);
*
* @param {boolean} caseInsensitive
* @returns {RegexpQuery} returns `this` so that calls can be chained.
*/
caseInsensitive(caseInsensitive) {
this._queryOpts.case_insensitive = caseInsensitive;
return this;
}
/**
* Sets the rewrite method. Valid values are:

@@ -31,0 +47,0 @@ * - `constant_score` - tries to pick the best constant-score rewrite

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc