[Bio] / Sprout / SHWordSearch.pm Repository:
ViewVC logotype

Diff of /Sprout/SHWordSearch.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7, Wed Dec 6 03:37:05 2006 UTC revision 1.8, Tue Apr 10 06:11:43 2007 UTC
# Line 157  Line 157 
157              # Here we do the search a group at a time.              # Here we do the search a group at a time.
158              for my $group (@groups) {              for my $group (@groups) {
159                  Trace("Starting the search.") if T(3);                  Trace("Starting the search.") if T(3);
160                    $self->PrintLine("Submitting search query for $group.<br />");
161                  my $query = $sprout->Search($keywords, 0, ['Feature', 'HasFeature', 'Genome'],                  my $query = $sprout->Search($keywords, 0, ['Feature', 'HasFeature', 'Genome'],
162                                              "Genome(primary-group) = ?", [$group]);                                              "Genome(primary-group) = ?", [$group]);
163                  Trace("Processing results.") if T(3);                  Trace("Processing results.") if T(3);
# Line 166  Line 167 
167          } else {          } else {
168              # Here we do one search just for features.              # Here we do one search just for features.
169                  Trace("Starting the search.") if T(3);                  Trace("Starting the search.") if T(3);
170                $self->PrintLine("Submitting search query for all genomes.<br />");
171              my $query = $sprout->Search($keywords, 0, ['Feature']);              my $query = $sprout->Search($keywords, 0, ['Feature']);
172                  Trace("Processing results.") if T(3);                  Trace("Processing results.") if T(3);
173              $retVal += $self->ProcessQuery($query);              $retVal += $self->ProcessQuery($query);
# Line 220  Line 222 
222  sub ProcessQuery {  sub ProcessQuery {
223      # Get the parameters.      # Get the parameters.
224      my ($self, $query) = @_;      my ($self, $query) = @_;
225        my $cgi = $self->Q();
226      # Clear the result counter.      # Clear the result counter.
227      my $retVal = 0;      my $retVal = 0;
228        $self->PrintLine("Processing query results.<br />");
229      # Create a feature data object for storing each result.      # Create a feature data object for storing each result.
230      my $fd = FeatureData->new($self);      my $fd = FeatureData->new($self);
231      Trace("Starting feature loop.") if T(3);      Trace("Starting feature loop.") if T(3);
# Line 233  Line 237 
237          $self->PutFeature($fd);          $self->PutFeature($fd);
238          # Increment the result counter.          # Increment the result counter.
239          $retVal++;          $retVal++;
240            if ($retVal % 100 == 0) {
241                $self->PrintLine("$retVal results processed.<br />");
242      }      }
243        }
244        $self->PrintLine("Results found: $retVal.<br />");
245      # Return the counter.      # Return the counter.
246      return $retVal;      return $retVal;
247  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3