summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-03-07 23:47:36 +0100
committerDylan William Hardison <dylan@hardison.net>2017-05-24 20:24:54 +0200
commit50fc9d77128db4f8565265047166c6ef61bac5c5 (patch)
treeeadc23eeaca476412e36c63161f5a2e4ab96aabd /Bugzilla/User.pm
parent0ea91b298e8fc1c439f42c9288247e9223ce552e (diff)
downloadbugzilla-50fc9d77128db4f8565265047166c6ef61bac5c5.tar.gz
bugzilla-50fc9d77128db4f8565265047166c6ef61bac5c5.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.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 05eaba099..294bdf758 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,
};
}