This plugin allows you to exclude certain topics from search results.
https://github.com/barisusakli/nodebb-plugin-topic-noindex
More info
https://github.com/NodeBB/NodeBB/issues/8212
@baris Thanks - I see it now.
@baris One thing I've noticed here is that the plugin seems gratuitous in terms of REGEX - it's matching on any part of the word, meaning things like AI
is detected inside disdain
and certain
- is there any way we can have a setting that looks for a complete match rather than partial ?
That sounds like a bug, please file it on the github repo. It should only match on whole words.
@baris I found the issue (for my case). In library.js
the regex statement looks for insensitive as below
keyword.nameRegex = XRegExp(`(?:^|\\s|\\>|;)(${keyword.name})`, 'gi');
I've changed it to
keyword.nameRegex = XRegExp(`(?:^|\\s|\\>|;)(${keyword.name})`, 'g');
Which works fine for my use case (virtually all of the acronyms I have are in upper case). However, lower case words are still affected.
Seems like it is already matching the whole world AI
it just matches lowercase as well. I can make the case-sensitivity an option in the ACP page.
@baris Yep, that would be great..
@baris From what I see, the plugin is actually firing on whole words
In this case, it's matching on bits
as well as bit
(which it should)
And also matching on dev
inside devil
EDIT: Sorry - this was due to the CSV import I have... Ignore that
@baris another suggestion would be to empty the table storing the glossary items. When you import 1000 plus from a CSV it's very clunky to have to delete them all one by one if you need to.
Published 0.0.7, with bunch of fixes and new options.
@baris Thanks. I spotted a bug in 0.6 when performing a large import. The mapping being returned should be (for example SNMP
Simple Network Management Protocol
comes back with SNMP
something completely wrong
)
Examples
and
Not sure if my data is incorrect (I'll check), but wanted to report this in case it is actually an issue. Reverting back to 0.5 the issue is not present
and
So, I think there is a bug somewhere
Yeah the csv import is pretty picky, it expects the format to be
keyword1, description1
or
keyword2, "description2"
If you provide a small csv sample that doesn't work I can take a look.
@baris thanks. So a space is required between the comma and the next field. Odd that this doesn't seem to happen in 0.0.5
I updated the plugin to use https://www.npmjs.com/package/csvtojson so it is using the csv spec from https://www.loc.gov/preservation/digital/formats/fdd/fdd000323.shtml
@baris This doesn't seem to work for me at all using the latest version sadly. It doesn't matter which format I use, the import always seems to work, but exhibits the same issues as I highlighted earlier. Version 0.5
does not have these issues from what I can tell.
Please share the csv you are having an issue with.
Published, 0.0.10 with some more fixes. I tried your csv and SNMP is working with latest. Obviously I haven't tested all 1000+ keywords
@baris thanks very much for this. I'll test it now
Edit - from what I can see, everything now works as expected. Thanks
Published 0.0.16