projecthydra/curate — pull request #425 by randalldfloyd (2014-02-19 17:37:00+00:00)
Title: Make partial matching work for keyword and autocomplete searches

To enable partial matching for various search types, the use of
EdgeNGram filters were employed in the SOLR schema. This was
accomplished in a way that also adds configurability into the
search system. This was not only desirable but necessary in order
to constrain the use of edge filtered fields to specific use cases
so as to not introduce unpredictable behavior. Configurability
means that:

- a new generator named curate:search_config changes SOLR
schema and config files based on user questions

- a configurable Yaml file (config/search_conig.yml) is used at
start that makes a hash available to controllers involved in SOLR
searches. This Yaml file is changed by the curate:search_config
generator to reflect SOLR config options.

Changes in this commit:

- Create curate:search_config generator in search_config_generator.rb
that edits SOLR schema and config files based on user questions.

- Modify curate_generator.rb to create initial search_config.yml file.

- Modify curate_generator.rb to write new lines to curate_initializer.rb
that will initialize search_config hash from Yaml file.

- Modify catalog_controller.rb and people_controller.rb to change hard
coded search options to read from initialized search_config hash.

- Modify configuration.rb to create accessors so that hash from
Yaml file is available as Curate.configuration.search_config

HYDRASIR-14 #close
HYDRASIR-15 #close