diff --git a/app/Livewire/Search.php b/app/Livewire/Search.php index fe5c775f..b4c28de8 100644 --- a/app/Livewire/Search.php +++ b/app/Livewire/Search.php @@ -142,9 +142,11 @@ public function render() if ($queryType == 'smiles' || $queryType == 'substructure') { $statement = - "select id, COUNT(*) OVER () from mols where m@>'". + "select id, COUNT(*) OVER () from fps where mfp2%morganbv_fp('". $this->query. - "' limit ". + "') order by morganbv_fp(mol_from_smiles('". + $this->query. + "'))<%>mfp2 limit ". $this->size. ' offset '. $offset; @@ -176,7 +178,9 @@ public function render() $statement = "select id, COUNT(*) OVER () from fps where mfp2%morganbv_fp('". $this->query. - "') limit ". + "') order by morganbv_fp(mol_from_smiles('". + $this->query. + "'))<%>mfp2 limit ". $this->size. ' offset '. $offset;