Extending the search box

Hi,

We can use the default search box (filter nodes) for searching installed nodes by their name. I want to extend the default search functionality to look-up nodes not only by name but also the description (other information which is not in the node name but comes with the node - this information is already in the node help) of the nodes. I have following questions.

(Same kind of search functionality in Node-Red node library which uses the keywords in the description)

  1. Is this possible to do, if so how?
  2. If I am doing this kind of extension, what is the method to incorporate it with node-red? Ex: Can I add my customization on top of node-red as an extension/plugin?

Regards,
Malintha

Hi @malinthasa

which search box are you referring to? The one on the Nodes tab of the 'manage palette' dialog?

There is no api for you to access to change that behaviour - it's hardcoded into the editor. That sort of change would need to be made in the core. But it sounds a useful addition, so I'm sure we'd welcome such a contribution. Which additional info specifically would you want to include in the search index? Within the editor, the only piece we don't currently index is the node help - anything else from the node's module (such as its README.md or package.json metadata) isn't available.

Nick

Hi Nick,

I am referring to the search box which is used to filter nodes. (which is in the top left corner of the editor).
Screenshot%20from%202018-10-29%2017-48-03

I have included some keywords in the node help which are not in the node name. I want users to find nodes using those keywords using the search box.

Example: I have installed a custom node named 'countdown' which has following content in it's help

Screenshot%20from%202018-10-29%2017-55-52

and I want to display countdown node when a user enters TimeData in 'filter nodes' search box.

Regards,
Malintha

sounds interesting, though I think we would need to be careful with help as there may be may words that appear in many help pages (like input for example, or maybe debug or...) which may then hide the actual result form the names you want - so maybe it needs to be optional or the results sorted or... maybe needs some thought.

Perhaps allowing a tag list would meet the needs? It would be another thing for node authors to remember but it would be backwards compatible and fairly straight-forwards I would think.

For example, there are some nodes that I always forget the name of if I've been away from Node-RED for a little while and it would be great to have some synonyms defined via tags.