Skip to content

Conversation

@kellyma2
Copy link
Contributor

If we treat + as a special character for queries we run into the problem that we can't create queries like:

topic:me+topic AND project:Baz

This appears to be equivalent to :

topic:me+topic+AND+project:Baz

Instead of treating + as a special character we can just ensure that queries have the former form.

If we treat `+` as a special character for queries we run into the
problem that we can't create queries like:

topic:me+topic AND project:Baz

This appears to be equivalent to :

topic:me+topic+AND+project:Baz

Instead of treating `+` as a special character we can just ensure that
queries have the former form.
@andygrunwald
Copy link
Owner

I don't have time to verify this right now.

@dmitshur Do you have time to look into this?

Copy link
Collaborator

@dmitshur dmitshur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, moving in this direction makes sense to me. This special behavior for '+' and ':' characters was added in PR #22 to resolve issue #18 (and it happened 9 years ago), but the issue described there seems more like a problem caused by "+" being used instead of " " (a space) in the original search query. When a space is used, it gets escaped to "+" as visible here.

So to me, it makes sense to proceed with this, unless someone can reproduce or clarify issue #18 now. (Perhaps undoing the entire behavior change of #22 is even better.)

@crackcomm
Copy link

I had a problem querying for label:Code-Review+2 on Gerrit v3.12.0, this fixes it for me.

@kellyma2
Copy link
Contributor Author

kellyma2 commented Dec 4, 2025

@dmitshur any chance we can get this merged?

Copy link
Collaborator

@dmitshur dmitshur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have no new information about issue #18, so let's move forward with the (partial) revert of PR #22.

@dmitshur dmitshur merged commit a7b2c28 into andygrunwald:master Dec 5, 2025
8 checks passed
@andygrunwald
Copy link
Owner

Thanks for taking care @dmitshur + the PR @kellyma2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants