summaryrefslogtreecommitdiffstats
path: root/scripts/suggest-user.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/suggest-user.pl')
-rw-r--r--scripts/suggest-user.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/suggest-user.pl b/scripts/suggest-user.pl
new file mode 100644
index 000000000..dcf24da87
--- /dev/null
+++ b/scripts/suggest-user.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use FindBin qw($RealBin);
+use lib ($RealBin);
+use Bugzilla;
+use Search::Elasticsearch;
+use Bugzilla::Elastic;
+
+my $elastic = Bugzilla::Elastic->new(
+ es_client => Search::Elasticsearch->new()
+);
+my $user = Bugzilla::User->check({name => 'dylan@mozilla.com'});
+Bugzilla->set_user($user);
+my $users;
+
+for (1..4) {
+ $users = $elastic->suggest_users($ARGV[0]);
+}
+print "$_->{name}\n" for @$users;