@@ -378,7 +378,9 @@ sub api_v1_GET_documents { | |||
my @out; | |||
my $q = sqlquery($dbh, "SELECT id FROM documents LIMIT ?,?", | |||
my $q = sqlquery($dbh, "SELECT id FROM documents WHERE id IN (CALL get_document_by_words(?)) LIMIT ?,?", | |||
exists $qs->{filter} ? $qs->{filter} : undef, | |||
$qs->{pageSize} * $qs->{pageIndex}, | |||
$qs->{pageSize}); | |||
while(my ($id) = $q->fetchrow_array()) { |