elastic-particles
Advanced tools
Comparing version 2.2.9 to 2.2.10
@@ -157,7 +157,7 @@ 'use strict'; | ||
if (q.post_filter) { | ||
_.forOwn(q.aggs, (value, key) => { | ||
_.forOwn(q.aggs, function(value, key) { | ||
if (q.aggs[key]._respectPostFilter) { | ||
q.aggs[key] = new FilteredAgg(value, q.post_filter); | ||
} | ||
}) | ||
}); | ||
} | ||
@@ -164,0 +164,0 @@ } |
@@ -9,3 +9,3 @@ 'use strict'; | ||
*/ | ||
function MissingFilter(field) { | ||
function MissingFilter() { | ||
throw new Error('The missing filter has been deprecated in elasticsearch 2.2. See https://www.elastic.co/guide/en/elasticsearch/reference/2.x/query-dsl-missing-query.html'); | ||
@@ -12,0 +12,0 @@ } |
@@ -6,5 +6,6 @@ 'use strict'; | ||
* @param {string} field Field to match against. | ||
* @param {string} query Query to match againt. | ||
* @param {string} query Query to match against. | ||
* @param {string} operator (optional) Operator to apply in match query. | ||
*/ | ||
function MatchQuery(field, query) { | ||
function MatchQuery(field, query, operator) { | ||
if (!field) { | ||
@@ -15,5 +16,13 @@ throw new Error('Match query requires a field.'); | ||
this.match = {}; | ||
this.match[field] = query; | ||
if (!operator) { | ||
this.match[field] = query; | ||
} else { | ||
this.match[field] = { | ||
query: query, | ||
operator: operator | ||
}; | ||
} | ||
} | ||
module.exports = MatchQuery; |
{ | ||
"name": "elastic-particles", | ||
"version": "2.2.9", | ||
"version": "2.2.10", | ||
"description": "Building blocks for Elastic queries, filters, and aggregations which can be re-used, combed, and nested.", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41155
1049