Socket
Socket
Sign inDemoInstall

pelias-query

Package Overview
Dependencies
Maintainers
5
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-query - npm Package Compare versions

Comparing version 9.10.0 to 9.11.0

2

package.json
{
"name": "pelias-query",
"version": "9.10.0",
"version": "9.11.0",
"description": "An Elasticsearch query builder for Pelias",

@@ -5,0 +5,0 @@ "engines": {

@@ -94,2 +94,36 @@ var multi_match = require('../../view/multi_match');

module.exports.tests.type = function (test, common) {
test('optional type', function (t) {
var vs = new VariableStore();
vs.var('query var', 'query value');
vs.var('multi_match:type', 'cross_fields');
var fields_with_boosts = [
{ field: 'field 1' },
{ field: 'field 2' },
{ field: 'field 3' }
];
var actual = multi_match(vs, fields_with_boosts, 'analyzer value', 'query var');
var expected = {
multi_match: {
fields: [
'field 1^1',
'field 2^1',
'field 3^1'
],
query: { $: 'query value' },
analyzer: 'analyzer value',
type: { $: 'cross_fields' },
}
};
t.deepEquals(actual, expected, 'should have returned object');
t.end();
});
};
module.exports.all = function (tape, common) {

@@ -96,0 +130,0 @@ function test(name, testFunction) {

@@ -34,2 +34,6 @@ /***

if (vs.isset('multi_match:type')) {
view.multi_match.type = vs.var('multi_match:type');
}
if (vs.isset('multi_match:cutoff_frequency')) {

@@ -36,0 +40,0 @@ view.multi_match.cutoff_frequency = vs.var('multi_match:cutoff_frequency');

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