Search feature improvements

i can only search for one string at a time

if i want to find a "change" node that sets the topit to motion and the value to outside i can not do that. i have to either search for motion or outside

when i implement search i split by space and do multiple searches so both words match.

or you can use "+" for this

Adding type:change will help somewhat.

chrome_9Bx7iy5Ayv

Additional filters can be added too:

But change is only going to show changed nodes right?
That does not help, since i mostly search to do a change. not after.

And limiting to one flow does not help me.

No, a search of type:change will filter the results to change nodes. Just as type:inject would filter the results to inject nodes.

ah. i did not get that. thanks for the tips.

Unfortiunatly it would not give me all the results i would like containing outside AND motion.

Essentially, it means splitting the whole search term by space, searching for each individually and then sorting results based on number of matches across those individual searches - as well as looking for precise matches of the terms as provided.

Entirely doable, and a well scoped feature request for someone to pick up. If you wanted to raise an issue on gh covering this feature request, that would be welcome.

I can do that.
But there is one issue when using space as a separator. When you want to find something that contains an exact string.
i have used the + sign as a " "(space) replacement before to do this.
But since we are searching for source code here i think it can cause issues.

I suggest using "AND" in upper case as a separator. And add it to the search option list.
Then we can still search for terms like "value + offset" without it beeing split.
I considered using && but that could also interfer with source code

Another option is to use "and:also" as a separator. that looks more similar to the other modifiers

What do you think?

The precise implementation details can be thrashed out in the issue.

Without having put much thought into it, I can see a way that searches more smartly without the user needing to know all the syntax tricks.

If they searched for red blue green, we could search the index red blue green, red, blue, green, then sort the results based on how much of a match they are.

If a user wanted more precise multi-word search, then "red blue" green would search for red blue and green separately.

I think that would lead to a more intuitive search result without needing to adopt new syntaxes.

Ok. i'll make a git issue on it. Thanks :slight_smile:

Is it worth considering the use of a 3rd-party search library?