Full text search in memory for review suggestions
This change also makes it possible to configure maximum
displayed reviewers.
On some Gerrit instances the full name is formatted like:
<given name> <surname>
and email like:
<given name>.<surname>@...
This would make it impossible to get reviewer suggestions from
surnames.
Since gwtorm doesn't support sql LIKE there is no straight forward
way of filtering on substring in the DB. Hence this in memory approach.
For performance reasons this implementation differs from the default
implementation in that it does not look at the email_address in
account_external_ids but only at the preferred_email of accounts.
The default implementation does only look for 10 matches and afterwards
filters out the acconts that are not allowed to view the change.
Configuration:
suggest.maxSuggestedReviewers
Maximum number of suggested reviewers (default 10).
suggest.fullTextSearch
Enable full text search (default "false").
suggest.fullTextSearchMaxMatches
Maximum number of matches to be checked for accessability when using
full text search (default 100).
Change-Id: Ia4c3a15263783bc144e66a05854c3915392095b5
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 63bd695..6742cc4 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -3110,6 +3110,16 @@
New configurations should prefer the boolean value for this field
and an enum value for `accounts.visibility`.
+[[suggest.maxSuggestedReviewers]]suggest.maxSuggestedReviewers::
++
+The maximum numbers of reviewers suggested.
++
+By default 10.
+
+[[suggest.fullTextSearch]]suggest.fullTextSearch::
++
+If 'true' the reviewer completion suggestions will be based on a full text search.
+
[[suggest.from]]suggest.from::
+
The number of characters that a user must have typed before suggestions
@@ -3117,6 +3127,15 @@
+
By default 0.
+[[suggest.fullTextSearchMaxMatches]]suggest.fullTextSearchMaxMatches::
++
+The maximum number of matches evaluated for change access when using full text search.
++
+Making this number too high could have a negative impact on performance.
++
+By default 100.
+
+
[[theme]]
=== Section theme