# Search: does \`uses:\` flag work and \`uses:selection\` might be an idea?

**URL:** <https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350>\
**Category:** General\
**Tags:** search\
**Created:** [11 October 2025 09:39 UTC](https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350 "2025-10-11T09:39:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [11 October 2025 09:39 UTC](https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350/1 "2025-10-11T09:39:49Z")

</div>

Hi There,

I was playing around with the idea of having a search limited to a selection of nodes/groups when I thought _how hard could it be?_.

So I had a look at the [source code](https://github.com/node-red/node-red/blob/5427d43a98eb5605cfcd99c4dec2f238f2ec7acc/packages/node_modules/%40node-red/editor-client/src/js/ui/search.js#L126-L237) and discovered the `uses:<node-id>` flag:

```auto
val = extractValue(val,"uses",flags);// uses:<node-id>

```

Great I thought, then all I need to do is implement `uses:selection`, which I did somewhat like this:

```javascript
if (flags.uses && flags.uses.indexOf("selection") >= 0) {
   let seletectedThings = (RED.view.selection() &&
       RED.view.selection().nodes) || [];

   flags.uses = seletectedThings.map( d => d.id )
   seletectedThings.forEach( thng => {
       if ( thng.type == "group" ) {
          RED.group.getNodes(thng,true,false).forEach( d => flags.uses.push(d.id) )
       }
   })

   flags.uses = [...new Set(flags.uses)]
}

```

But then I discovered that the `uses` feature doesn't work or at least I couldn't get it working. So I debugged it. Eventually I figured out how the search works and that the `uses` flags should be used as a filter and not as a keys reduction value. Anyway, a made [two other changes](https://github.com/gorenje/cdn.flowhub.org/commit/d584344050e4de8aba4566673d3fe34ba9a4ea14) and now the feature is available over at [Browser-Red](https://cdn.flowhub.org).

![uses-search2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/391675f3d657a514cf4210a4407f2b27569a4550.gif)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [11 October 2025 18:06 UTC](https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350/2 "2025-10-11T18:06:27Z")

</div>

Could be a PR ?

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [11 October 2025 18:26 UTC](https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350/3 "2025-10-11T18:26:26Z")

</div>

> [@Sean-McG](#):
>
> PR

I would prefer to have confirmation that a) it's something that will be merged b) enough folks actually want this c) if someone else wants to create a PR, go for it - I don't have an issue with someone else taking the code and claiming the kudos.

And also d) I'm pretty sure that I'm misusing the idea of `uses:`, I assume it has some other meaning since `uses:<node-id>` makes no sense since the search is limited to that single node!

Btw the reason I implemented this was because I wanted to import [Hacker News](https://discourse.nodered.org/t/hacker-news-stories-as-trees/99236) discussions and then _solely_ search those discussions for keywords.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 January 2026 18:27 UTC](https://discourse.nodered.org/t/search-does-uses-flag-work-and-uses-selection-might-be-an-idea/99350/4 "2026-01-09T18:27:02Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
