diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-03-07 23:47:36 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-03-07 23:49:02 +0100 |
commit | 9c26c01867ca3e2af1e70c051140eea59c68c500 (patch) | |
tree | 5b7b8a9e3f953a650ef1c3f07cabc4e71d750e42 /Bugzilla/User.pm | |
parent | 91248ef8f435814392896e247c45e09119ec6729 (diff) | |
download | bugzilla-9c26c01867ca3e2af1e70c051140eea59c68c500.tar.gz bugzilla-9c26c01867ca3e2af1e70c051140eea59c68c500.tar.xz |
Bug 1307485 - Add code to run a subset of buglist.cgi search queries against the ES backend
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 69885f57c..e8ddc0be7 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -128,7 +128,7 @@ with 'Bugzilla::Elastic::Role::Object'; sub ES_TYPE { 'user' } -sub ES_OBJECTS_AT_ONCE { 2000 } +sub ES_OBJECTS_AT_ONCE { 5000 } sub ES_SELECT_UPDATED_SQL { my ($class, $mtime) = @_; @@ -150,7 +150,7 @@ sub ES_SELECT_ALL_SQL { my $id = $class->ID_FIELD; my $table = $class->DB_TABLE; - return ("SELECT $id FROM $table WHERE $id > ? AND is_enabled ORDER BY $id", [$last_id // 0]); + return ("SELECT $id FROM $table WHERE $id > ? AND is_enabled AND NOT disabledtext ORDER BY $id", [$last_id // 0]); } sub ES_PROPERTIES { @@ -175,7 +175,6 @@ sub ES_PROPERTIES { sub es_document { my ( $self, $timestamp ) = @_; - my $weight = eval { $self->last_activity_ts ? datetime_from($self->last_activity_ts)->epoch : 0 } // 0; my $doc = { login => $self->login, name => $self->name, @@ -184,7 +183,6 @@ sub es_document { input => [ $self->login, $self->name ], output => $self->identity, payload => { name => $self->login, real_name => $self->name }, - weight => $weight, }, }; if ($self->name && $self->name =~ /:(\w+)/) { @@ -193,7 +191,6 @@ sub es_document { input => [ $ircnick ], output => $self->login, payload => { name => $self->login, real_name => $self->name, ircnick => $ircnick }, - weight => $weight, }; } |