myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2369] branches/biocat: added search support for


From: noreply
Subject: [myexperiment-hackers] [2369] branches/biocat: added search support for services
Date: Wed, 31 Mar 2010 09:49:52 -0400 (EDT)

Revision
2369
Author
dgc
Date
2010-03-31 09:49:52 -0400 (Wed, 31 Mar 2010)

Log Message

added search support for services

Modified Paths

Diff

Modified: branches/biocat/Rakefile (2368 => 2369)


--- branches/biocat/Rakefile	2010-03-31 13:15:32 UTC (rev 2368)
+++ branches/biocat/Rakefile	2010-03-31 13:49:52 UTC (rev 2369)
@@ -17,6 +17,7 @@
   User.rebuild_solr_index
   Network.rebuild_solr_index
   Pack.rebuild_solr_index
+  Service.rebuild_solr_index
 end
 
 desc 'Refresh workflow metadata'

Modified: branches/biocat/app/models/service.rb (2368 => 2369)


--- branches/biocat/app/models/service.rb	2010-03-31 13:15:32 UTC (rev 2368)
+++ branches/biocat/app/models/service.rb	2010-03-31 13:49:52 UTC (rev 2369)
@@ -10,5 +10,13 @@
   acts_as_site_entity
   acts_as_contributable
   acts_as_structured_data
+
+  acts_as_solr(:fields => [ :submitter_label, :name, :provider_label, :endpoint,
+      :wsdl, :city, :country, :description, :extra_search_terms ]) if Conf.solr_enable
+
+  def extra_search_terms
+    service_categories.map do |category| category.label end +
+    service_tags.map do |tag| tag.label end +
+    service_types.map do |types| types.label end
+  end
 end
-

Modified: branches/biocat/config/default_settings.yml (2368 => 2369)


--- branches/biocat/config/default_settings.yml	2010-03-31 13:15:32 UTC (rev 2368)
+++ branches/biocat/config/default_settings.yml	2010-03-31 13:49:52 UTC (rev 2369)
@@ -224,7 +224,7 @@
 # search_categories - These are the search categories shown in the search bar
 #                     just under the main tabs.
 
-search_categories: [all, users, groups, workflows, files, packs]
+search_categories: [all, users, groups, workflows, services, files, packs]
 
 # default_search_size - The default number of items shown in each search result
 #                       page.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]