Error: ENOENT: no such file or directory, open 'C:\Users\User\Downloads\1.7.x\NodeBB\build\public\templates\admin\plugins\write-api.tpl'
[nodebb-plugin-solr] Solr search plugin
kinderjaje last edited by
I was thinking about it for long time Solr, Elastic search. Is this forum now using solr ?
Yes, @kinderjaje, when v0.1.0 was released (yesterday afternoon), I implemented it onto this forum, you can test it right now.
@julian I want to use this plugin and I have updated lastest NodeBB and Solr, but when I run ./nodebb dev, I got these warns:
warn: [plugins/nodebb-plugin-solr] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
warn: [plugins/nodebb-plugin-solr] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-solr".
And when I use this I got some other errors. So what shoud I do to make this work?
Pylon can safely ignore warns about plugin incompatibility, this usually means that at some point in the future, a hook will be removed in favour for another one.
What are the errors you see when trying to actually run solr?
So we have to install Solr first, correct?
...then install the plugin?
Can't wait for the inline-topic searching!
When I try accessing the Solr page via ACP, it gives me a 404 error. Any thoughts?
This post is deleted!
npm install nodebb-plugin-solr
Maybe you should upgrade NodeBB to the latest.
@main It is updated to latest.
I have the same problem before, but after update NodeBB and Solr plugin, it's gone. Have you updated all of that?
This is the error I'm getting:
warn: Plugin: /home/c/node_modules/nodebb-plugin-solr is corrupted or invalid. Please check plugin.json for errors.
I disabled all plugins @[email protected]
I noticed theres a version difference in NPM and on Github.
@a_5mith I can't build index and when I search got this error:
TypeError: Cannot read property 'response' of null at /var/local/swift/node_modules/nodebb-plugin-solr/library.js:173:11 at ClientRequest.<anonymous> (/var/local/swift/node_modules/nodebb-plugin-solr/node_modules/solr-client/lib/solr.js:576:21) at ClientRequest.EventEmitter.emit (events.js:95:17) at Socket.socketErrorListener (http.js:1547:9) at Socket.EventEmitter.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:415:13)
@trevor Yes, npm is the latest.
@a_5mith I think it's because I didn't install Solr, so I'll install and try again.
Okay apparently it WASN'T updated to latest, lol. The following changes were made that fixed it; https://github.com/NodeBB/NodeBB/commit/7212f95582eb1e828ad6845a1b7f7f4dbb8b9e39
@trevor Thank you too, I just installed Solr by your instruction and make everything works!
Note: Installing and running Solr takes up a good bit of your CPU so if you're using DigitalOcean, I suggest you use the 10$/mo plan instead of the $5/mo.
How does this plugin compare to the DB Search as far as features and accuracy?
Haowei last edited by
It works fine on our http://nodebb.org.cn
Hi @Guiri, good question!
This plugin is closer to a traditional full-text search plugin you'd see in use on other sites. It's more powerful than a simple fulltext search, because we can do thing like word exclusions (e.g.
forum -NodeBB), boosts (e.g.
forum +punBB), and can even sort relevancy better by ranking documents higher if the searched terms are closer together, or are sequential (e.g. A search for
Farmer Johnwould rank
This is a topic about Farmer Johnhigher than
John is a Farmer)
The existing search plugin uses phonetics to determine matches, which would cause problems when things had the same phonetic sounds, but were completely different words. (e.g.
farmare very different, but have the same consonants).
Some development notes re: Solr
The default configuration saves topic titles in
title_tand post content in
description_t. These are defined in the default
schema.xmlshipped with Solr as:
<dynamicField name="*_t" type="text_general" indexed="true" stored="true"/>
falsewould decrease the index size (and increase search efficiency by a small amount), as the actual post content would not be saved on-disk or in-memory.
Before, the index for this forum was about 7.5 MB. By setting stored to
false, the index size is now 2.6 MB.
Would look into further customisation of the plugin (so you can define your own fields in
schema.xmlif you'd like) for the next version...