New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

feathers-solr

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-solr - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

48

lib/index.js

@@ -124,2 +124,21 @@ const { _ } = require('@feathersjs/commons');

async _update(id, data, params = {}) {
const sel = select(params, this.id);
const dataToUpdate = await this._getOrFind(id, params);
if (!dataToUpdate[this.id]) {
throw new errors.NotFound('No record found');
}
data[this.id] = id || dataToUpdate[this.id];
// update
await this.Model.post('update/json', [data], Object.assign(params, this.commit));
// get updated data
const updatedData = await this._getOrFind(id, params);
return _.omit(sel(updatedData), 'score', '_version_');
}
async _remove(id, params = {}) {

@@ -138,3 +157,3 @@ if (id === null && _.isEmpty(params)) {

// delete
const response = await this.Model.post('update/json', query, Object.assign(this.commit));
await this.Model.post('update/json', query, Object.assign(this.commit));

@@ -144,19 +163,22 @@ return sel(dataToDelete);

async _update(id, data, params = {}) {
const sel = select(params, this.id);
const dataToUpdate = await this._getOrFind(id, params);
filterQuery(params = {}) {
const filtered = super.filterQuery(params);
if (!dataToUpdate[this.id]) {
throw new errors.NotFound('No record found');
// inject search options
if (_.has(filtered, 'query.$search')) {
const params = Object.assign(this.search, filtered.query.$params);
if (!_.isEmpty(params)) filtered.query.$params = params;
}
data[this.id] = id || dataToUpdate[this.id];
// inject suggest options
if (_.has(filtered, 'query.$suggest')) {
filtered.query.$params = Object.assign(this.search, filtered.query.$params);
}
// update
const response = await this.Model.post('update/json', [data], Object.assign(params, this.commit));
// inject spellcheck options
if (_.has(filtered, 'query.$spellcheck')) {
filtered.query.$params = Object.assign(this.search, filtered.query.$params);
}
// get updated data
const updatedData = await this._getOrFind(id, params);
return _.omit(sel(updatedData), 'score', '_version_');
return filtered;
}

@@ -163,0 +185,0 @@ }

{
"name": "feathers-solr",
"description": "A service plugin for Solr",
"version": "2.4.0",
"version": "2.5.0",
"homepage": "https://github.com/sajov/feathers-solr",

@@ -6,0 +6,0 @@ "keywords": [

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