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 8.13.0 to 8.14.0

25

layout/StructuredFallbackQuery.js

@@ -442,2 +442,24 @@ // This query is used for component geocodes, where the individual fields have

function addPostCode(vs) {
var o = addPrimary(
vs.var('input:postcode').toString(),
'postalcode',
[
'parent.postalcode'
],
false
);
// same position in hierarchy as borough according to WOF
// https://github.com/whosonfirst/whosonfirst-placetypes#here-is-a-pretty-picture
addSecLocality(vs, o);
addSecCounty(vs, o);
addSecRegion(vs, o);
addSecCountry(vs, o);
return o;
}
Layout.prototype.render = function( vs ){

@@ -457,2 +479,5 @@ var q = Layout.base( vs );

}
if (vs.isset('input:postcode')) {
funcScoreShould.push(addPostCode(vs));
}
if (vs.isset('input:neighbourhood')) {

@@ -459,0 +484,0 @@ funcScoreShould.push(addNeighbourhood(vs));

2

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

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

@@ -63,2 +63,21 @@ {

}
},
{
"bool": {
"_name": "fallback.postalcode",
"must": [
{
"multi_match": {
"query": "postcode value",
"type": "phrase",
"fields": ["parent.postalcode"]
}
}
],
"filter": {
"term": {
"layer": "postalcode"
}
}
}
}

@@ -65,0 +84,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