user-search: Remove approval requirement from basic search
Basic search (i.e. not using the explicit predicate) can never work
as expected for approval requirements because when a label is applied
to a change a comment containing the label name is added as a message
on the change. This means that any change with that label will match
with the comment predicate, regardless of the label score.
For example if we have two changes with the following labels:
Change 1: Code-Review+2
Change 2: Code-Review+1
Then both changes have messages like:
Patch Set 1: Code-Review+2
Patch Set 1: Code-Review+1
And when we issue the query:
Code-Review+2
the query builder resolves it into both a label predicate (which will
only match change 1) and a message predicate (which will match both
changes).
Undo the formatting change that was done in Ia1a138d3e, since it is no
longer relevant.
Instead, remove the approval requirement section from the basic search
documentation.
Add a clarification that if the user wants predictable search results
they should use explicit predicates rather than the basic search.
This reverts commit 025b2633ae
.
Bug: Issue 8589
Change-Id: I58a27530c3f2b530d078e030b2eebd3e47c82f0f
This commit is contained in:
@@ -9,14 +9,14 @@ query, execute it, and present the results.
|
|||||||
[options="header"]
|
[options="header"]
|
||||||
|=================================================
|
|=================================================
|
||||||
|Description | Default Query
|
|Description | Default Query
|
||||||
|All > Open | `status:open '(or is:open)'`
|
|All > Open | status:open '(or is:open)'
|
||||||
|All > Merged | `status:merged`
|
|All > Merged | status:merged
|
||||||
|All > Abandoned | `status:abandoned`
|
|All > Abandoned | status:abandoned
|
||||||
|My > Drafts | `owner:self is:draft`
|
|My > Drafts | owner:self is:draft
|
||||||
|My > Watched Changes | `is:watched is:open`
|
|My > Watched Changes | is:watched is:open
|
||||||
|My > Starred Changes | `is:starred`
|
|My > Starred Changes | is:starred
|
||||||
|My > Draft Comments | `has:draft`
|
|My > Draft Comments | has:draft
|
||||||
|Open changes in Foo | `status:open project:Foo`
|
|Open changes in Foo | status:open project:Foo
|
||||||
|=================================================
|
|=================================================
|
||||||
|
|
||||||
|
|
||||||
@@ -28,17 +28,19 @@ text and let Gerrit figure out the meaning:
|
|||||||
[options="header"]
|
[options="header"]
|
||||||
|=============================================================
|
|=============================================================
|
||||||
|Description | Examples
|
|Description | Examples
|
||||||
|Legacy numerical id | `15183`
|
|Legacy numerical id | 15183
|
||||||
|Full or abbreviated Change-Id | `Ic0ff33`
|
|Full or abbreviated Change-Id | Ic0ff33
|
||||||
|Full or abbreviated commit SHA-1 | `d81b32ef`
|
|Full or abbreviated commit SHA-1 | d81b32ef
|
||||||
|Email address | `user@example.com`
|
|Email address | user@example.com
|
||||||
|Approval requirement | `Code-Review>=+2`, `Verified=1`
|
|
||||||
|=============================================================
|
|=============================================================
|
||||||
|
|
||||||
For change searches (i.e. those using a numerical id, Change-Id, or commit
|
For change searches (i.e. those using a numerical id, Change-Id, or commit
|
||||||
SHA1), if the search results in a single change that change will be
|
SHA1), if the search results in a single change that change will be
|
||||||
presented instead of a list.
|
presented instead of a list.
|
||||||
|
|
||||||
|
For more predictable results, use explicit search operators as described
|
||||||
|
in the following section.
|
||||||
|
|
||||||
[[search-operators]]
|
[[search-operators]]
|
||||||
== Search Operators
|
== Search Operators
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user