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.)

"+": "GOGERRIT_URL_PLACEHOLDER_PLUS",
":": "GOGERRIT_URL_PLACEHOLDER_COLON"}

// addOptions adds the parameters in opt as URL query parameters to s.
Copy link
Collaborator

Choose a reason for hiding this comment

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

On line 531 (below), the "+" character is still being mentioned.

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.

3 participants