Socket
Socket
Sign inDemoInstall

@olasearch/solr-adapter

Package Overview
Dependencies
5
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.6 to 1.6.7

35

lib/utils/index.js
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _uniq = require('ramda/src/uniq');

@@ -10,3 +12,3 @@

// const WeightRegExp = /weight\((\w{1,}):\w{1,}\^?(\d{1,}\.?\d*)?/gmi;
var WeightRegExp = /((?!T|\d)\w{1,}):\w{1,}\)?\^?((\d{1,}\.?\d*)?)/gm;
var WeightRegExp = /((?!T|\d)\w{1,}):\w{1,}\)?\)?\^?((\d{1,}\.?\d*)?)/gm;
var ScoreRegExp = /^\n?(\d{1,}\.?\d*)/gmi;

@@ -34,11 +36,24 @@

if (m) {
var score = m[2] ? parseFloat(m[2]) : 1;
var field = m[1];
if (fields.indexOf(field) === -1) {
fields.push(field);
out.push({
field: field,
score: score
});
}
(function () {
var score = m[2] ? parseFloat(m[2]) : 1;
var field = m[1];
if (field && fields.indexOf(field) === -1) {
fields.push(field);
out.push({
field: field,
score: score
});
} else {
if (score > 1) {
out = out.map(function (item) {
if (item.field === field) {
return _extends({}, item, {
score: score
});
}
return item;
});
}
}
})();
}

@@ -45,0 +60,0 @@ }

{
"name": "@olasearch/solr-adapter",
"version": "1.6.6",
"version": "1.6.7",
"description": "OlaSearch adapter for Solr",

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

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