diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-03-17 21:53:57 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-03-17 21:53:57 +0100 |
commit | 1ad85fd04a2268a660fbf35068e730dda917d137 (patch) | |
tree | 3155f5d6d82532810cb653fa04b7e466199f7e71 /Bugzilla/User.pm | |
parent | 4cc54c4c9acd39b1b0850c9d5a937f5f909d18d0 (diff) | |
download | bugzilla-1ad85fd04a2268a660fbf35068e730dda917d137.tar.gz bugzilla-1ad85fd04a2268a660fbf35068e730dda917d137.tar.xz |
Bug 1307485 - Add code to run a subset of buglist.cgi search queries against the ES backend
This not the cause of test failures, so should live on in master now.
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, }; } |