Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

irisjs-apachesolr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

irisjs-apachesolr - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

53

irisjsApachesolr.js

@@ -47,3 +47,25 @@ iris.modules.auth.globals.registerPermission("can fetch page", "Search", "Can user search records");

iris.route.get('/search', routes.query, function (req, res) {
iris.modules.irisjsApachesolr.globals.generateSearch(req, res);
var options = {
req: req,
res: res,
query: req.query,
};
iris.modules.irisjsApachesolr.globals.generateSearch(options, function(markup) {
iris.modules.frontend.globals.parseTemplateFile(['solrsearch'], ['html'], {results: markup}, req.authPass, req)
.then(function (output) {
res.send(output);
}, function (fail) {
iris.modules.frontend.globals.displayErrorPage(500, req, res);
iris.log("error", fail);
});
});
});

@@ -431,8 +453,8 @@

*/
iris.modules.irisjsApachesolr.globals.generateSearch = function (req, res) {
iris.modules.irisjsApachesolr.globals.generateSearch = function (options, callback) {
var query = iris.modules.irisjsApachesolr.globals.generateQuery(req.query);
var query = iris.modules.irisjsApachesolr.globals.generateQuery(options.query);
if (query) {
if (query.parameters[0] = 'q=') {
if (query.parameters[0] == 'q=') {
query.parameters[0] = 'q=*:*';

@@ -448,15 +470,4 @@ }

iris.modules.frontend.globals.parseTemplateFile(['solrsearch'], ['html'], {results: markup}, req.authPass, req)
callback(markup);
.then(function (output) {
res.send(output);
}, function (fail) {
iris.modules.frontend.globals.displayErrorPage(500, req, res);
iris.log("error", fail);
});
}

@@ -489,7 +500,7 @@

};
iris.invokeHook("hook_entity_fetch", req.authPass, null, entityQuery)
iris.invokeHook("hook_entity_fetch", options.req.authPass, null, entityQuery)
.then(function (entity) {
if (entity && entity[0]) {
iris.modules.frontend.globals.parseTemplateFile(['solrresult', result.entityType[0]], null, entity[0], req.authPass, req)
iris.modules.frontend.globals.parseTemplateFile(['solrresult', result.entityType[0]], null, entity[0], options.req.authPass, options.req)

@@ -501,3 +512,3 @@ .then(function (output) {

}, function (fail) {
iris.modules.frontend.globals.displayErrorPage(500, req, res);
iris.modules.frontend.globals.displayErrorPage(500, options.req, res);
iris.log("error", fail);

@@ -531,3 +542,3 @@

iris.modules.frontend.globals.parseTemplateFile(['solrsearch'], ['html'], {results: '<div class="alert alert-danger">' + req.authPass.t("Cannot connect to Apachesolr") + '</div>'}, req.authPass, req)
iris.modules.frontend.globals.parseTemplateFile(['solrsearch'], ['html'], {results: '<div class="alert alert-danger">' + req.authPass.t("Cannot connect to Apachesolr") + '</div>'}, options.req.authPass, options.req)

@@ -540,3 +551,3 @@ .then(function (output) {

iris.modules.frontend.globals.displayErrorPage(500, req, res);
iris.modules.frontend.globals.displayErrorPage(500, options.req, res);
iris.log("error", fail);

@@ -543,0 +554,0 @@

{
"name": "irisjs-apachesolr",
"version": "1.0.3",
"version": "1.0.4",
"description": "Apache solr search integration for the IrisJS framework",

@@ -5,0 +5,0 @@ "main": "irisjs.org",

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