@julian said in Search options for 2019 NodeBB:
Dbsearch is the recommendation
This is what we are using now. We used to use Solr but it had issues and we came back.
@tlinden what does the following query return? db.searchtopic.find({id: 178});
I'm using chinese as forum language and I'm experiencing the same problem.
@baris said in Search unreliable:
@tlinden what does the following query return?
db.searchtopic.find({id: 178});
@baris this::
> db.searchtopic.find({id: 178})
{ "_id" : ObjectId("5a9d818cd19a243c1a362c1c"), "id" : 178, "content" : "Semmelknödel ala Tom", "cid" : "24", "uid" : "3" }
@tlinden ok so it is in the searchtopic
collection, does searching for it like this find it?
db.searchtopic.find( { $text: { $search: "Semmelknödel" }}
I don't think full text search supports partial word matches right now. https://stackoverflow.com/questions/44833817/mongodb-full-and-partial-text-search?rq=1
I will hopefully add language support to dbsearch plugin if mongodb is used https://github.com/barisusakli/nodebb-plugin-dbsearch/issues/33
Ah, that explains it! Searching for Semmelknödel
reveals 1 topic and 2 posts (which is correct). So, we have to seach for whole words until partial matches are supported sometime.
Ok, still a little annoying for the girls, but I'm going to blame you
However, thanks for clarifying @baris !
best,
Tom
@tlinden Yeah I agree it's a bit annoying, there is an issue for it here https://jira.mongodb.org/browse/SERVER-15090 so it might be supported in the future.
[email protected] adds support for different languages. You can switch to German and see if it improves your results.
You can also try Solr search for NodeBB.
First install solr-jetty (jetty is lighter and has better performance than tomcat):
sudo apt-get install solr-jetty
(This also automatically installs the many needed dependencies, basically Java packages).
Optional: Temporarily open port 8080 if you want to see Solr admin (not needed):
(Port 8080 worked for me; if not, try 8983).
Then install NodeBB's Solr plugin:
NodeBB Admin > Extend > Plugins > Find Plugins > nodebb-plugin-solr > Install
Then activate the plugin, restart NodeBB, reload admin page, and go to:
Plugins > Apache Solr
Configuration:
Host: localhost
Port: 8080
Path: /solr
Save Settings
Reload NodeBB and admin page.
Connected
Indexing Enabled
Rebuild Search Index
Disable port 8080 (or 8983) on firewall for security.
It works well.
Thanks for the tutorial, but I won't do that, it's like we say in Germany: "mit Kanonen auf Spatzen schiessen" (shooting with canons on sparrows). Also, I can't install software, because I'm on a shared system w/o root.
best,
Tom
@Juan-G I found it does not work with https, do you have any suggestions?