Skip to content

Adding new search engines and search interfaces

noklesta edited this page Dec 18, 2012 · 3 revisions
  • Add a new Rails resource (model and controller) for the search engine. The model and the controller should be located within the respective SearchTypes modules and inherit from the Search model and the SearchesController, respectively.

  • Add the resource to the list of resources in routes.rb (following cwb_searches as the example in that file shows).

  • Create an Ember.js model in app/assets/javascripts/rglossa/models/search_types. The model should extend App.Search.

  • Create a new directory in app/assets/javascripts/rglossa/controllers/search and and populate it with Ember.js controllers mirroring the ones in app/assets/javascripts/rglossa/controllers/search/cwb.

  • Do the same thing with views in app/assets/javascripts/rglossa/views/search and templates in app/assets/javascripts/rglossa/templates/search.

  • Add routes for the new search interface in app/assets/javascripts/rglossa/states/router.coffee.erb (see the comments in that file for a description of how to route to the correct routes depending on a particular search, corpus, or RGlossa installation).

  • Connect the new controllers in the connectControllers() method defined in app/assets/javascripts/rglossa/app.coffee.

Clone this wiki locally