Socket
Socket
Sign inDemoInstall

nodebb-plugin-solr

Package Overview
Dependencies
35
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

9

library.js

@@ -169,5 +169,6 @@ 'use strict';

}
var isTopic = data.index === 'topic';
var field = isTopic ? 'tid_i' : 'pid_id';
// Determine which cache to use
var cache = data.index === 'topic' ? titleCache : postCache;
var cache = isTopic ? titleCache : postCache;

@@ -181,3 +182,3 @@ if (cache.has(data.query)) {

// Populate Fields
if (data.index === 'topic') { fields[Solr.config.titleField || 'title_t'] = 1; }
if (isTopic) { fields[Solr.config.titleField || 'title_t'] = 1; }
else { fields[Solr.config.contentField || 'description_t'] = 1; }

@@ -192,3 +193,3 @@

var payload = obj.response.docs.map(function(result) {
return result[data.index === 'topic' ? 'tid_i' : 'pid_i'];
return result[field];
}).filter(Boolean);

@@ -195,0 +196,0 @@

{
"name": "nodebb-plugin-solr",
"version": "1.0.2",
"version": "1.0.3",
"description": "Full-text searching for NodeBB using Apache Solr",

@@ -5,0 +5,0 @@ "main": "library.js",

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