gerrit/gerrit-acceptance-tests
Saša Živkov ebe85a04e7 Use in-memory Lucene index for a better reviewer suggestion
Instead of a linear full text search through a list of accounts use an
in-memory Lucene index. This brings several advantages:

* the search is faster
* the order or first/last name is not important i.e. searching for
  "jo d" will find both "John Doe" and "Doe John"
* ranking of the hits done by the Lucene

The in-memory index is periodically refreshed. The refresh period is
configurable via the suggest.fullTextSearchRefresh parameter.

A side effect of this change is that searching for reviewers by an
arbitrary substring is not supported any more. For example, before this
change a string like "n d" would find the "John Doe" as the search
string is a substring of the whole name. With this change the "n d"
wouldn't find the "John Doe" because the search is prefix based.

On the positive side the "old" approach is sensitive to the order of the
first/last name in the account name and searching for "Doe John" wouldn't
find the "John Doe". With this change we verify that each segment of the
search string appears as a prefix in any component of the name. Therefore,
we can find the "John Doe" with any of the following strings: "John Doe",
"Doe John", "jo d", "doe j" etc...

Bug: issue 321
Change-Id: If20cbafa8ee5983d3cae0ab8d581a6f4fe41415a
2015-05-07 10:33:00 +02:00
..