hydra-head 3.0.0pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. data/.gitignore +71 -0
  2. data/.gitmodules +6 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +257 -0
  5. data/README.textile +150 -0
  6. data/README_RAILS3_CHANGES.textile +42 -0
  7. data/Rakefile +5 -0
  8. data/TESTING.textile +85 -0
  9. data/app/controllers/assets_controller.rb +117 -0
  10. data/app/controllers/contributors_controller.rb +54 -0
  11. data/app/controllers/file_assets_controller.rb +152 -0
  12. data/app/controllers/permissions_controller.rb +137 -0
  13. data/app/controllers/user_sessions_controller.rb +14 -0
  14. data/app/helpers/article_metadata_helper.rb +80 -0
  15. data/app/helpers/blacklight_helper.rb +192 -0
  16. data/app/helpers/downloads_helper.rb +19 -0
  17. data/app/helpers/generic_content_objects_helper.rb +16 -0
  18. data/app/helpers/hydra_assets_helper.rb +75 -0
  19. data/app/helpers/hydra_djatoka_helper.rb +23 -0
  20. data/app/helpers/hydra_fedora_metadata_helper.rb +365 -0
  21. data/app/helpers/hydra_helper.rb +155 -0
  22. data/app/helpers/hydra_uploader_helper.rb +18 -0
  23. data/app/helpers/inline_editable_metadata_helper.rb +15 -0
  24. data/app/helpers/javascript_includes_helper.rb +93 -0
  25. data/app/helpers/release_process_helper.rb +32 -0
  26. data/app/models/audio_asset.rb +8 -0
  27. data/app/models/file_asset.rb +111 -0
  28. data/app/models/generic_content.rb +21 -0
  29. data/app/models/generic_image.rb +62 -0
  30. data/app/models/image_asset.rb +8 -0
  31. data/app/models/mods_asset.rb +6 -0
  32. data/app/models/role_mapper.rb +22 -0
  33. data/app/models/superuser.rb +6 -0
  34. data/app/models/video_asset.rb +8 -0
  35. data/app/views/_add_assets_links.html.erb +13 -0
  36. data/app/views/_brown_sidebar.html +15 -0
  37. data/app/views/_user_util_links.html.erb +31 -0
  38. data/app/views/catalog/_citation.html.erb +11 -0
  39. data/app/views/catalog/_constraints_element.html.erb +34 -0
  40. data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
  41. data/app/views/catalog/_document_list.html.erb +11 -0
  42. data/app/views/catalog/_edit_partials/_default.html.erb +64 -0
  43. data/app/views/catalog/_edit_partials/_default_details.html.erb +15 -0
  44. data/app/views/catalog/_email_form.html.erb +9 -0
  45. data/app/views/catalog/_facets.html.erb +37 -0
  46. data/app/views/catalog/_flash_msg.html.erb +17 -0
  47. data/app/views/catalog/_home.html.erb +6 -0
  48. data/app/views/catalog/_home_text.html.erb +10 -0
  49. data/app/views/catalog/_index_partials/_default.html.erb +20 -0
  50. data/app/views/catalog/_index_partials/_default_details.html.erb +11 -0
  51. data/app/views/catalog/_index_partials/_default_group.html.erb +15 -0
  52. data/app/views/catalog/_search_form.html.erb +12 -0
  53. data/app/views/catalog/_show_partials/_default.html.erb +23 -0
  54. data/app/views/catalog/_show_partials/_default_details.html.erb +12 -0
  55. data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
  56. data/app/views/catalog/_sms_form.html.erb +21 -0
  57. data/app/views/catalog/_sort_and_per_page.html.erb +22 -0
  58. data/app/views/catalog/_uva_tabs.html.erb +10 -0
  59. data/app/views/catalog/about.html.erb +0 -0
  60. data/app/views/catalog/show.html.erb +48 -0
  61. data/app/views/contributors/_add_contributor_split_button.html.erb +10 -0
  62. data/app/views/contributors/_edit_conference.html.erb +29 -0
  63. data/app/views/contributors/_edit_organization.html.erb +29 -0
  64. data/app/views/contributors/_edit_person.html.erb +42 -0
  65. data/app/views/contributors/_index.html.erb +12 -0
  66. data/app/views/contributors/_new.html.erb +10 -0
  67. data/app/views/contributors/_show_conference.html.erb +22 -0
  68. data/app/views/contributors/_show_organization.html.erb +29 -0
  69. data/app/views/contributors/_show_person.html.erb +17 -0
  70. data/app/views/contributors/new.html.erb +13 -0
  71. data/app/views/downloads/index.html.erb +1 -0
  72. data/app/views/file_assets/_deletable_result.html.erb +5 -0
  73. data/app/views/file_assets/_index.html.erb +15 -0
  74. data/app/views/file_assets/_new.html.erb +2 -0
  75. data/app/views/file_assets/_result.html.erb +16 -0
  76. data/app/views/file_assets/index.html.erb +5 -0
  77. data/app/views/fluid_infusion/_uploader.html.erb +81 -0
  78. data/app/views/fluid_infusion/_uploader_generic_content_objects.js.erb +38 -0
  79. data/app/views/fluid_infusion/_uploader_js.erb +45 -0
  80. data/app/views/generic_content_objects/_edit_description.html.erb +50 -0
  81. data/app/views/generic_content_objects/_new.html.erb +0 -0
  82. data/app/views/generic_content_objects/_show_description.html.erb +68 -0
  83. data/app/views/generic_content_objects/contributors/_edit_conference.html.erb +29 -0
  84. data/app/views/generic_content_objects/contributors/_edit_organization.html.erb +29 -0
  85. data/app/views/generic_content_objects/contributors/_edit_person.html.erb +37 -0
  86. data/app/views/generic_content_objects/contributors/_new.html.erb +10 -0
  87. data/app/views/generic_content_objects/contributors/_show_conference.html.erb +22 -0
  88. data/app/views/generic_content_objects/contributors/_show_organization.html.erb +22 -0
  89. data/app/views/generic_content_objects/contributors/_show_person.html.erb +38 -0
  90. data/app/views/generic_contents/_edit.html.erb +59 -0
  91. data/app/views/generic_contents/_index.html.erb +23 -0
  92. data/app/views/generic_contents/_show.html.erb +18 -0
  93. data/app/views/generic_contents/_show_content.html.erb +4 -0
  94. data/app/views/generic_images/_edit.html.erb +59 -0
  95. data/app/views/generic_images/_index.html.erb +24 -0
  96. data/app/views/generic_images/_show.html.erb +18 -0
  97. data/app/views/generic_images/_show_all.html.erb +14 -0
  98. data/app/views/generic_images/_show_content.html.erb +7 -0
  99. data/app/views/layouts/application.html.erb +57 -0
  100. data/app/views/layouts/hydra-head.html.erb +12 -0
  101. data/app/views/mods_assets/_edit.html.erb +49 -0
  102. data/app/views/mods_assets/_edit_description.html.erb +82 -0
  103. data/app/views/mods_assets/_edit_journal.html.erb +72 -0
  104. data/app/views/mods_assets/_index.html.erb +1 -0
  105. data/app/views/mods_assets/_index_list.html.erb +37 -0
  106. data/app/views/mods_assets/_index_table.html.erb +7 -0
  107. data/app/views/mods_assets/_progress_box.html.erb +82 -0
  108. data/app/views/mods_assets/_show.html.erb +44 -0
  109. data/app/views/mods_assets/_show_description.html.erb +44 -0
  110. data/app/views/mods_assets/_show_journal.html.erb +42 -0
  111. data/app/views/mods_assets/_show_permissions.html.erb +14 -0
  112. data/app/views/permissions/_edit_person_permissions.html.erb +35 -0
  113. data/app/views/permissions/_index.html.erb +55 -0
  114. data/app/views/permissions/_new.html.erb +18 -0
  115. data/app/views/permissions/index.html.erb +1 -0
  116. data/app/views/permissions/new.html.erb +1 -0
  117. data/app/views/shared/_delete_asset_confirmation.html.erb +17 -0
  118. data/app/views/user_sessions/_login_form.html.erb +10 -0
  119. data/app/views/user_sessions/logged_out.html.erb +1 -0
  120. data/config/routes.rb +12 -0
  121. data/fedora_conf/conf/fedora.fcfg +1021 -0
  122. data/hydra-head.gemspec +70 -0
  123. data/lib/application_controller.rb +25 -0
  124. data/lib/application_helper.rb +2 -0
  125. data/lib/engine.rb +30 -0
  126. data/lib/generators/hydra/head_generator.rb +152 -0
  127. data/lib/generators/hydra/templates/config/fedora.yml +17 -0
  128. data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +246 -0
  129. data/lib/generators/hydra/templates/config/initializers/fedora_config.rb +23 -0
  130. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +29 -0
  131. data/lib/generators/hydra/templates/config/role_map_cucumber.yml +10 -0
  132. data/lib/generators/hydra/templates/config/role_map_development.yml +12 -0
  133. data/lib/generators/hydra/templates/config/role_map_production.yml +2 -0
  134. data/lib/generators/hydra/templates/config/role_map_test.yml +15 -0
  135. data/lib/generators/hydra/templates/config/solr.yml +10 -0
  136. data/lib/generators/hydra/templates/config/solr_mappings.yml +22 -0
  137. data/lib/generators/hydra/templates/fedora_conf/conf/fedora.fcfg +1021 -0
  138. data/lib/generators/hydra/templates/migrations/add_user_attributes_table.rb +15 -0
  139. data/lib/generators/hydra/templates/migrations/create_superusers.rb +12 -0
  140. data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +118 -0
  141. data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +332 -0
  142. data/lib/generators/hydra/templates/solr_conf/solr.xml +35 -0
  143. data/lib/hydra-head.rb +29 -0
  144. data/lib/hydra-head/engine.rb +9 -0
  145. data/lib/hydra-head/routes.rb +87 -0
  146. data/lib/hydra-head/version.rb +4 -0
  147. data/lib/hydra.rb +22 -0
  148. data/lib/hydra/access_controls_enforcement.rb +236 -0
  149. data/lib/hydra/access_controls_evaluation.rb +97 -0
  150. data/lib/hydra/assets_controller_helper.rb +144 -0
  151. data/lib/hydra/catalog.rb +64 -0
  152. data/lib/hydra/common_mods_index_methods.rb +42 -0
  153. data/lib/hydra/controller.rb +7 -0
  154. data/lib/hydra/file_assets_helper.rb +144 -0
  155. data/lib/hydra/fixtures.rb +43 -0
  156. data/lib/hydra/generic_content.rb +113 -0
  157. data/lib/hydra/generic_image.rb +100 -0
  158. data/lib/hydra/image.rb +177 -0
  159. data/lib/hydra/model_methods.rb +95 -0
  160. data/lib/hydra/model_mixins.rb +2 -0
  161. data/lib/hydra/model_mixins/common_metadata.rb +24 -0
  162. data/lib/hydra/model_mixins/mods_object.rb +16 -0
  163. data/lib/hydra/mods_article.rb +505 -0
  164. data/lib/hydra/mods_dataset.rb +165 -0
  165. data/lib/hydra/mods_generic_content.rb +494 -0
  166. data/lib/hydra/mods_image.rb +494 -0
  167. data/lib/hydra/repository_controller.rb +102 -0
  168. data/lib/hydra/rights_metadata.rb +189 -0
  169. data/lib/hydra/superuser_attributes.rb +12 -0
  170. data/lib/hydra/testing_server.rb +183 -0
  171. data/lib/hydra/user.rb +22 -0
  172. data/lib/mediashelf/active_fedora_helper.rb +72 -0
  173. data/lib/railties/all_tests.rake +23 -0
  174. data/lib/railties/hydra-fixtures.rake +184 -0
  175. data/lib/railties/hydra_jetty.rake +79 -0
  176. data/lib/railties/hyhead_cucumber.rake +127 -0
  177. data/lib/railties/hyhead_rspec.rake +137 -0
  178. data/lib/stanford/searchworks_helper.rb +1338 -0
  179. data/lib/stanford/solr_helper.rb +108 -0
  180. data/lib/uva/mods_index_methods.rb +24 -0
  181. data/solr_conf/conf/schema.xml +122 -0
  182. data/solr_conf/conf/solrconfig.xml +332 -0
  183. data/solr_conf/solr.xml +35 -0
  184. data/tasks/hydra-head-fixtures.rake +54 -0
  185. data/tasks/hydra-head.rake +247 -0
  186. data/tasks/hydra_jetty.rake +79 -0
  187. data/tasks/replicator.rake +27 -0
  188. data/tasks/solrizer-fedora.rake +53 -0
  189. data/tasks/solrizer.rake +13 -0
  190. data/test_support/etc/Gemfile +29 -0
  191. data/test_support/etc/rvmrc +32 -0
  192. data/test_support/features/button_add_assets.feature +22 -0
  193. data/test_support/features/button_add_generic_content.feature +11 -0
  194. data/test_support/features/button_add_image.feature +11 -0
  195. data/test_support/features/button_add_mods_asset.feature +11 -0
  196. data/test_support/features/contributor_add.feature +39 -0
  197. data/test_support/features/file_assets_list.feature +32 -0
  198. data/test_support/features/file_upload.feature +40 -0
  199. data/test_support/features/home_page.feature +9 -0
  200. data/test_support/features/html_validity.feature +47 -0
  201. data/test_support/features/mods_asset_contributors_edit.feature +80 -0
  202. data/test_support/features/mods_asset_create.feature +12 -0
  203. data/test_support/features/mods_asset_edit.feature +33 -0
  204. data/test_support/features/mods_asset_edit_without_permission.feature +10 -0
  205. data/test_support/features/mods_asset_search_result.feature +13 -0
  206. data/test_support/features/mods_asset_show.feature +39 -0
  207. data/test_support/features/permissions_add.feature +15 -0
  208. data/test_support/features/permissions_edit.feature +63 -0
  209. data/test_support/features/step_definitions/catalog_index_steps.rb +14 -0
  210. data/test_support/features/step_definitions/create_asset_steps.rb +7 -0
  211. data/test_support/features/step_definitions/edit_metadata_steps.rb +73 -0
  212. data/test_support/features/step_definitions/file_list_steps.rb +28 -0
  213. data/test_support/features/step_definitions/hydra_metadata_steps.rb +3 -0
  214. data/test_support/features/step_definitions/hydra_steps.rb +8 -0
  215. data/test_support/features/step_definitions/inline_editable_edit_steps.rb +77 -0
  216. data/test_support/features/step_definitions/search_steps.rb +88 -0
  217. data/test_support/features/step_definitions/searching_steps.rb +22 -0
  218. data/test_support/features/step_definitions/show_document_steps.rb +85 -0
  219. data/test_support/features/step_definitions/user_steps.rb +36 -0
  220. data/test_support/features/step_definitions/web_steps.rb +219 -0
  221. data/test_support/features/support/env.rb +55 -0
  222. data/test_support/features/support/paths.rb +80 -0
  223. data/test_support/features/switch_users.feature +14 -0
  224. data/test_support/features/view_catalog_index.feature +18 -0
  225. data/test_support/fixtures/empty_file.txt +0 -0
  226. data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +1212 -0
  227. data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +4946 -0
  228. data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +234 -0
  229. data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +177 -0
  230. data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +170 -0
  231. data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +187 -0
  232. data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +676 -0
  233. data/test_support/fixtures/image.jp2 +0 -0
  234. data/test_support/fixtures/libra-oa_1.foxml.xml +2324 -0
  235. data/test_support/fixtures/libra-oa_2.foxml.xml +2422 -0
  236. data/test_support/spec/controllers/assets_controller_spec.rb +113 -0
  237. data/test_support/spec/controllers/catalog_controller_spec.rb +148 -0
  238. data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +62 -0
  239. data/test_support/spec/controllers/contributors_controller_spec.rb +47 -0
  240. data/test_support/spec/controllers/file_assets_controller_spec.rb +189 -0
  241. data/test_support/spec/controllers/hydra_controller_spec.rb +15 -0
  242. data/test_support/spec/controllers/permissions_controller_spec.rb +80 -0
  243. data/test_support/spec/controllers/user_sessions_controller_spec.rb +35 -0
  244. data/test_support/spec/generators/hydra-head_generator_spec.rb +14 -0
  245. data/test_support/spec/helpers/access_controls_enforcement_spec.rb +212 -0
  246. data/test_support/spec/helpers/access_controls_evaluation_spec.rb +35 -0
  247. data/test_support/spec/helpers/assets_controller_helper_spec.rb +71 -0
  248. data/test_support/spec/helpers/blacklight_helper_spec.rb +64 -0
  249. data/test_support/spec/helpers/file_assets_helper_spec.rb +107 -0
  250. data/test_support/spec/helpers/hydra-repository_controller_spec.rb +32 -0
  251. data/test_support/spec/helpers/hydra_assets_helper_spec.rb +195 -0
  252. data/test_support/spec/helpers/hydra_djatoka_helper_spec.rb +32 -0
  253. data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +215 -0
  254. data/test_support/spec/helpers/hydra_helper_spec.rb +73 -0
  255. data/test_support/spec/helpers/hydra_model_methods_spec.rb +95 -0
  256. data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +18 -0
  257. data/test_support/spec/helpers/javascript_includes_helper_spec.rb +43 -0
  258. data/test_support/spec/integration/file_asset_spec.rb +150 -0
  259. data/test_support/spec/lib/active_fedora_helper_spec.rb +56 -0
  260. data/test_support/spec/lib/catalog_spec.rb +16 -0
  261. data/test_support/spec/lib/common_mods_index_methods_spec.rb +28 -0
  262. data/test_support/spec/models/audio_asset_spec.rb +23 -0
  263. data/test_support/spec/models/file_asset_spec.rb +42 -0
  264. data/test_support/spec/models/generic_content_spec.rb +29 -0
  265. data/test_support/spec/models/generic_image_spec.rb +58 -0
  266. data/test_support/spec/models/hydra_rights_metadata_spec.rb +162 -0
  267. data/test_support/spec/models/image_asset_spec.rb +23 -0
  268. data/test_support/spec/models/mods_asset_spec.rb +29 -0
  269. data/test_support/spec/models/role_mapper_spec.rb +22 -0
  270. data/test_support/spec/models/user_spec.rb +52 -0
  271. data/test_support/spec/models/video_asset_spec.rb +23 -0
  272. data/test_support/spec/rcov.opts +3 -0
  273. data/test_support/spec/spec.opts +4 -0
  274. data/test_support/spec/spec_helper.rb +44 -0
  275. data/test_support/spec/support/matchers/helper_matcher.rb +14 -0
  276. data/test_support/spec/support/matchers/solr_matchers.rb +60 -0
  277. data/test_support/spec/unit/hydra-head-engine_spec.rb +8 -0
  278. data/test_support/spec/unit/hydra-head_spec.rb +8 -0
  279. data/test_support/spec/utilities/hydra_testing_server_spec.rb +49 -0
  280. data/test_support/spec/views/uploader.html.erb_spec.rb +30 -0
  281. data/vendor/cache/RedCloth-4.2.3.gem +0 -0
  282. data/vendor/cache/abstract-1.0.0.gem +0 -0
  283. data/vendor/cache/actionmailer-3.0.9.gem +0 -0
  284. data/vendor/cache/actionpack-3.0.9.gem +0 -0
  285. data/vendor/cache/active-fedora-2.3.3.gem +0 -0
  286. data/vendor/cache/activemodel-3.0.9.gem +0 -0
  287. data/vendor/cache/activerecord-3.0.9.gem +0 -0
  288. data/vendor/cache/activeresource-3.0.9.gem +0 -0
  289. data/vendor/cache/activesupport-3.0.9.gem +0 -0
  290. data/vendor/cache/arel-2.0.10.gem +0 -0
  291. data/vendor/cache/blacklight-3.0.0.gem +0 -0
  292. data/vendor/cache/block_helpers-0.3.3.gem +0 -0
  293. data/vendor/cache/builder-2.1.2.gem +0 -0
  294. data/vendor/cache/capybara-1.0.0.gem +0 -0
  295. data/vendor/cache/childprocess-0.2.0.gem +0 -0
  296. data/vendor/cache/columnize-0.3.4.gem +0 -0
  297. data/vendor/cache/crack-0.1.8.gem +0 -0
  298. data/vendor/cache/cucumber-1.0.2.gem +0 -0
  299. data/vendor/cache/cucumber-rails-1.0.2.gem +0 -0
  300. data/vendor/cache/curb-0.7.15.gem +0 -0
  301. data/vendor/cache/daemons-1.1.4.gem +0 -0
  302. data/vendor/cache/database_cleaner-0.6.7.gem +0 -0
  303. data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
  304. data/vendor/cache/equivalent-xml-0.2.7.gem +0 -0
  305. data/vendor/cache/erubis-2.6.6.gem +0 -0
  306. data/vendor/cache/facets-2.8.4.gem +0 -0
  307. data/vendor/cache/factory_girl-1.3.3.gem +0 -0
  308. data/vendor/cache/fastercsv-1.5.4.gem +0 -0
  309. data/vendor/cache/ffi-1.0.9.gem +0 -0
  310. data/vendor/cache/gherkin-2.4.5.gem +0 -0
  311. data/vendor/cache/haml-3.1.2.gem +0 -0
  312. data/vendor/cache/httparty-0.7.8.gem +0 -0
  313. data/vendor/cache/i18n-0.5.0.gem +0 -0
  314. data/vendor/cache/jettywrapper-0.0.10.gem +0 -0
  315. data/vendor/cache/json-1.5.3.gem +0 -0
  316. data/vendor/cache/json_pure-1.5.3.gem +0 -0
  317. data/vendor/cache/kaminari-0.12.4.gem +0 -0
  318. data/vendor/cache/launchy-2.0.3.gem +0 -0
  319. data/vendor/cache/linecache-0.46.gem +0 -0
  320. data/vendor/cache/logger-1.2.8.gem +0 -0
  321. data/vendor/cache/mail-2.2.19.gem +0 -0
  322. data/vendor/cache/marc-0.4.3.gem +0 -0
  323. data/vendor/cache/mediashelf-loggable-0.4.2.gem +0 -0
  324. data/vendor/cache/mime-types-1.16.gem +0 -0
  325. data/vendor/cache/mocha-0.9.12.gem +0 -0
  326. data/vendor/cache/multipart-post-1.1.2.gem +0 -0
  327. data/vendor/cache/nokogiri-1.5.0.gem +0 -0
  328. data/vendor/cache/om-1.2.5.gem +0 -0
  329. data/vendor/cache/polyglot-0.3.1.gem +0 -0
  330. data/vendor/cache/rack-1.2.3.gem +0 -0
  331. data/vendor/cache/rack-mount-0.6.14.gem +0 -0
  332. data/vendor/cache/rack-test-0.5.7.gem +0 -0
  333. data/vendor/cache/rails-3.0.9.gem +0 -0
  334. data/vendor/cache/railties-3.0.9.gem +0 -0
  335. data/vendor/cache/rake-0.9.2.gem +0 -0
  336. data/vendor/cache/rbx-require-relative-0.0.5.gem +0 -0
  337. data/vendor/cache/rcov-0.9.9.gem +0 -0
  338. data/vendor/cache/rdoc-3.8.gem +0 -0
  339. data/vendor/cache/rsolr-1.0.2.gem +0 -0
  340. data/vendor/cache/rsolr-ext-1.0.3.gem +0 -0
  341. data/vendor/cache/rspec-2.6.0.gem +0 -0
  342. data/vendor/cache/rspec-core-2.6.4.gem +0 -0
  343. data/vendor/cache/rspec-expectations-2.6.0.gem +0 -0
  344. data/vendor/cache/rspec-mocks-2.6.0.gem +0 -0
  345. data/vendor/cache/rspec-rails-2.6.1.gem +0 -0
  346. data/vendor/cache/ruby-debug-0.10.4.gem +0 -0
  347. data/vendor/cache/ruby-debug-base-0.10.4.gem +0 -0
  348. data/vendor/cache/rubyzip-0.9.4.gem +0 -0
  349. data/vendor/cache/sanitize-2.0.3.gem +0 -0
  350. data/vendor/cache/selenium-webdriver-0.2.2.gem +0 -0
  351. data/vendor/cache/solr-ruby-0.0.8.gem +0 -0
  352. data/vendor/cache/solrizer-1.1.0.gem +0 -0
  353. data/vendor/cache/solrizer-fedora-1.1.0.gem +0 -0
  354. data/vendor/cache/sqlite3-ruby-1.2.5.gem +0 -0
  355. data/vendor/cache/stomp-1.1.9.gem +0 -0
  356. data/vendor/cache/term-ansicolor-1.0.5.gem +0 -0
  357. data/vendor/cache/thor-0.14.6.gem +0 -0
  358. data/vendor/cache/treetop-1.4.9.gem +0 -0
  359. data/vendor/cache/trollop-1.16.2.gem +0 -0
  360. data/vendor/cache/tzinfo-0.3.29.gem +0 -0
  361. data/vendor/cache/unicode-0.4.0.gem +0 -0
  362. data/vendor/cache/will_paginate-2.3.15.gem +0 -0
  363. data/vendor/cache/xml-simple-1.1.0.gem +0 -0
  364. data/vendor/cache/xpath-0.1.4.gem +0 -0
  365. data/vendor/cache/yard-0.7.2.gem +0 -0
  366. metadata +1110 -0
@@ -0,0 +1,108 @@
1
+ # Stanford SolrHelper is a controller layer mixin. It is in the controller scope: request params, session etc.
2
+ #
3
+ # NOTE: Be careful when creating variables here as they may be overriding something that already exists.
4
+ # The ActionController docs: http://api.rubyonrails.org/classes/ActionController/Base.html
5
+ #
6
+ # Override these methods in your own controller for customizations:
7
+ #
8
+ # class HomeController < ActionController::Base
9
+ #
10
+ # include Stanford::SolrHelper
11
+ #
12
+ # def solr_search_params
13
+ # super.merge :per_page=>10
14
+ # end
15
+ #
16
+ # end
17
+ #
18
+ module Stanford::SolrHelper
19
+
20
+ # returns a params hash for a home facet field solr query.
21
+ # used primary by the get_facet_pagination method
22
+ def home_facet_params(extra_controller_params={})
23
+ input = params.deep_merge(extra_controller_params)
24
+ {
25
+ :qt => Blacklight.config[:default_qt],
26
+ :per_page => 0,
27
+ :phrase_filters => input[:f],
28
+ "f.callnum_top_facet.facet.sort" => "false"
29
+ }
30
+ end
31
+
32
+ # returns a params hash for the advanced search facet field solr query.
33
+ # used primary by the get_facet_pagination method
34
+ def advanced_search_facet_params(extra_controller_params={})
35
+ input = params.deep_merge(extra_controller_params)
36
+ {
37
+ :qt => Blacklight.config[:default_qt],
38
+ :per_page => 0,
39
+ :phrase_filters => input[:f],
40
+ "f.callnum_top_facet.facet.sort" => "false",
41
+ "f.format.facet.sort" => "false",
42
+ "f.building_facet.facet.sort" => "false",
43
+ "f.access_facet.facet.sort" => "false",
44
+ "f.language.facet.limit" => 100
45
+ }
46
+ end
47
+
48
+ # a solr query method
49
+ # given a user query, return a solr response containing both result docs and facets
50
+ # - mixes in the Blacklight::Solr::SpellingSuggestions module
51
+ # - the response will have a spelling_suggestions method
52
+ def get_advanced_search_facets(extra_controller_params={})
53
+ Blacklight.solr.find self.advanced_search_facet_params(extra_controller_params)
54
+ end
55
+
56
+ # a solr query method
57
+ # given a user query, return a solr response containing both result docs and facets
58
+ # - mixes in the Blacklight::Solr::SpellingSuggestions module
59
+ # - the response will have a spelling_suggestions method
60
+ def get_home_facets(extra_controller_params={})
61
+ Blacklight.solr.find self.home_facet_params(extra_controller_params)
62
+ end
63
+
64
+ # given a field name and a field value, get the next "alphabetic" N
65
+ # terms for the field
66
+ # returns array of one element hashes with key=term and value=count
67
+ # NOTE: terms in index are case sensitive! Okay for shelfkey ...
68
+ def get_next_terms(curr_value, field, how_many)
69
+ # TermsComponent Query to get the terms
70
+ solr_params = {
71
+ 'terms.fl' => field,
72
+ 'terms.lower' => curr_value,
73
+ :per_page => how_many
74
+ }
75
+ solr_response = Blacklight.solr.send_request('/alphaTerms', solr_params)
76
+
77
+ # create array of one element hashes with key=term and value=count
78
+ result = []
79
+ terms ||= solr_response['terms'] || []
80
+ field_terms ||= terms[1] || []
81
+ # field_terms is an array of value, then num hits, then next value, then hits ...
82
+ i = 0
83
+ until result.length == how_many || i >= field_terms.length do
84
+ term_hash = {field_terms[i] => field_terms[i+1]}
85
+ result << term_hash
86
+ i = i + 2
87
+ end
88
+
89
+ result
90
+ end
91
+
92
+ # given a field name and array of values, get the matching SOLR documents
93
+ def get_docs_for_field_values(values, field)
94
+ value_str = "(\"" + values.join("\" OR \"") + "\")"
95
+ solr_params = {
96
+ :qt => "standard", # need boolean for OR
97
+ :q => "#{field}:#{value_str}",
98
+ 'fl' => "*",
99
+ 'facet' => 'false',
100
+ 'spellcheck' => 'false'
101
+ }
102
+
103
+ solr_response = Blacklight.solr.find solr_params
104
+ solr_response.docs
105
+ end
106
+
107
+
108
+ end
@@ -0,0 +1,24 @@
1
+ module Uva
2
+ module ModsIndexMethods
3
+ # extracts the last_name##full_name##computing_id to be used by home view
4
+ def extract_person_full_names_and_computing_ids
5
+ names = {}
6
+ self.find_by_terms(:person).each do |person|
7
+ name_parts = person.children.inject({}) do |hash,child|
8
+ hash[child.get_attribute(:type)] = child.text if ["family","given"].include? child.get_attribute(:type)
9
+ hash["computing_id"] = child.text if child.name == 'computing_id'
10
+ hash
11
+ end
12
+ if name_parts.length == 3 and person.search(:roleTerm).children.text.include?("Author")
13
+ if name_parts["family"].blank? && name_parts["given"].blank? && name_parts["computing_id"].blank?
14
+ value = "Unknown Author"
15
+ else
16
+ value = "#{name_parts["family"]}, #{name_parts["given"]} (#{name_parts["computing_id"]})"
17
+ end
18
+ ::Solrizer::Extractor.insert_solr_field_value(names, "person_full_name_cid_facet", value) if name_parts.length == 3
19
+ end
20
+ end
21
+ names
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,122 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!--
3
+ IMPORTANT
4
+ This copy of the solr schema is only used in the context of testing hydra-head. If you want to make changes available to individual hydra heads, you must apply them to the template in lib/generators/hydra/templates/solr_config
5
+ -->
6
+ <schema name="Hydra" version="1.1">
7
+ <!-- For complete comments from the Solr project example schema.xml:
8
+ http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/schema.xml?view=markup
9
+ See also:
10
+ http://wiki.apache.org/solr/SchemaXml
11
+ -->
12
+ <types>
13
+ <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
14
+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
15
+ <fieldType name="integer" class="solr.IntField" omitNorms="true"/>
16
+ <fieldType name="long" class="solr.LongField" omitNorms="true"/>
17
+ <fieldType name="float" class="solr.FloatField" omitNorms="true"/>
18
+ <fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
19
+ <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
20
+ <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
21
+ <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
22
+ <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
23
+ <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
24
+ <fieldType name="random" class="solr.RandomSortField" indexed="true" />
25
+
26
+ <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
27
+ <analyzer>
28
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
29
+ </analyzer>
30
+ </fieldType>
31
+
32
+ <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
33
+ <analyzer type="index">
34
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
35
+ <filter class="solr.StopFilterFactory"
36
+ ignoreCase="true"
37
+ words="stopwords.txt"
38
+ enablePositionIncrements="true"
39
+ />
40
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
41
+ <filter class="solr.LowerCaseFilterFactory"/>
42
+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
43
+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
44
+ </analyzer>
45
+ <analyzer type="query">
46
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
47
+ <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
48
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
49
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
50
+ <filter class="solr.LowerCaseFilterFactory"/>
51
+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
52
+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
53
+ </analyzer>
54
+ </fieldType>
55
+
56
+ <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
57
+ <analyzer>
58
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
59
+ <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
60
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
61
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
62
+ <filter class="solr.LowerCaseFilterFactory"/>
63
+ <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
64
+ <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
65
+ </analyzer>
66
+ </fieldType>
67
+
68
+ <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
69
+ <analyzer>
70
+ <tokenizer class="solr.KeywordTokenizerFactory"/>
71
+ <filter class="solr.LowerCaseFilterFactory" />
72
+ <filter class="solr.TrimFilterFactory" />
73
+ <filter class="solr.PatternReplaceFilterFactory"
74
+ pattern="([^a-z])" replacement="" replace="all"
75
+ />
76
+ </analyzer>
77
+ </fieldType>
78
+
79
+ <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />
80
+
81
+ </types>
82
+
83
+ <!-- For complete comments from the Solr project example schema.xml:
84
+ http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/schema.xml?view=markup
85
+ See also:
86
+ http://wiki.apache.org/solr/SchemaXml
87
+ -->
88
+ <fields>
89
+
90
+ <field name="id" type="string" indexed="true" stored="true" required="true" />
91
+ <field name="text" type="text" indexed="true" stored="true" multiValued="true"/>
92
+ <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
93
+
94
+ <!-- format is used for facet, display, and choosing which partial to use for the show view, so it must be stored and indexed -->
95
+ <field name="format" type="string" indexed="true" stored="true"/>
96
+ <!-- pub_date is assumed by Blacklight's default configuration, so we must define it here to avoid errors -->
97
+ <field name="pub_date" type="string" indexed="true" stored="true" multiValued="true"/>
98
+
99
+ <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
100
+ <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
101
+ <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
102
+ <dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
103
+ <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
104
+ <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
105
+ <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
106
+ <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
107
+
108
+ <dynamicField name="random*" type="random" />
109
+ <!-- FIXME: Solr can't sort on a multivalued field -->
110
+ <dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="true"/>
111
+ <!-- FIXME: generally, facet fields are not stored -->
112
+ <dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true" />
113
+ <dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
114
+
115
+ </fields>
116
+
117
+ <uniqueKey>id</uniqueKey>
118
+ <defaultSearchField>text</defaultSearchField>
119
+ <solrQueryParser defaultOperator="AND" />
120
+ <copyField source="*_facet" dest="text" />
121
+
122
+ </schema>
@@ -0,0 +1,332 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <!-- For complete comments from the Solr project example solrconfig.xml:
4
+ http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
5
+ See also:
6
+ http://wiki.apache.org/solr/SolrConfigXml
7
+ -->
8
+ <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
9
+
10
+ <indexDefaults>
11
+ <useCompoundFile>false</useCompoundFile>
12
+ <mergeFactor>10</mergeFactor>
13
+ <ramBufferSizeMB>32</ramBufferSizeMB>
14
+ <maxMergeDocs>2147483647</maxMergeDocs>
15
+ <maxFieldLength>10000</maxFieldLength>
16
+ <writeLockTimeout>1000</writeLockTimeout>
17
+ <commitLockTimeout>10000</commitLockTimeout>
18
+ <lockType>single</lockType>
19
+ </indexDefaults>
20
+
21
+ <mainIndex>
22
+ <useCompoundFile>false</useCompoundFile>
23
+ <ramBufferSizeMB>32</ramBufferSizeMB>
24
+ <mergeFactor>10</mergeFactor>
25
+ <maxMergeDocs>2147483647</maxMergeDocs>
26
+ <maxFieldLength>10000</maxFieldLength>
27
+ <unlockOnStartup>false</unlockOnStartup>
28
+ </mainIndex>
29
+
30
+ <jmx />
31
+
32
+ <!-- the default high-performance update handler -->
33
+ <updateHandler class="solr.DirectUpdateHandler2">
34
+ </updateHandler>
35
+
36
+
37
+ <query>
38
+ <maxBooleanClauses>1024</maxBooleanClauses>
39
+ <filterCache class="solr.LRUCache"
40
+ size="512"
41
+ initialSize="512"
42
+ autowarmCount="128"/>
43
+ <queryResultCache class="solr.LRUCache"
44
+ size="512"
45
+ initialSize="512"
46
+ autowarmCount="32"/>
47
+ <documentCache class="solr.LRUCache"
48
+ size="512"
49
+ initialSize="512"
50
+ autowarmCount="0"/>
51
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
52
+ <queryResultWindowSize>50</queryResultWindowSize>
53
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
54
+ <HashDocSet maxSize="3000" loadFactor="0.75"/>
55
+
56
+ <listener event="newSearcher" class="solr.QuerySenderListener">
57
+ <arr name="queries">
58
+ <lst> <str name="q">hydrus</str></lst>
59
+ </arr>
60
+ </listener>
61
+
62
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
63
+ <arr name="queries">
64
+ <lst> <str name="q">hydrus</str></lst>
65
+ </arr>
66
+ </listener>
67
+
68
+ <useColdSearcher>false</useColdSearcher>
69
+ <maxWarmingSearchers>2</maxWarmingSearchers>
70
+ </query>
71
+
72
+ <requestDispatcher handleSelect="true" >
73
+ <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
74
+ <httpCaching lastModifiedFrom="openTime"
75
+ etagSeed="Solr">
76
+ </httpCaching>
77
+ </requestDispatcher>
78
+
79
+ <requestHandler name="standard" class="solr.SearchHandler">
80
+ <lst name="defaults">
81
+ <str name="echoParams">explicit</str>
82
+ </lst>
83
+ </requestHandler>
84
+
85
+ <!-- For complete comments from the Solr project example solrconfig.xml:
86
+ http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/conf/solrconfig.xml
87
+ See also:
88
+ http://wiki.apache.org/solr/SolrConfigXml
89
+ -->
90
+
91
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
92
+ <lst name="defaults">
93
+ <!-- Making defType lucene to exclude file assets -->
94
+ <str name="defType">lucene</str>
95
+ <!-- lucene params -->
96
+ <str name="df">has_model_s</str>
97
+ <str name="q.op">AND</str>
98
+ <!-- dismax params -->
99
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
100
+ <str name="q.alt">*:*</str>
101
+ <str name="qf_dismax">id^0.8 id_t^0.8 title_t^0.3 mods_t^0.2</str>
102
+ <str name="pf_dismax">id^0.9 id_t^0.9 title_t^0.5 mods_t^0.2</str>
103
+ <int name="ps">100</int>
104
+ <float name="tie">0.01</float>
105
+ <!-- general -->
106
+ <str name="facet">on</str>
107
+ <str name="facet.mincount">1</str>
108
+ <str name="echoParams">explicit</str>
109
+ <str name="fl">
110
+ id,title_t,date_t,year_facet,month_facet,has_model_s,has_collection_member_s,is_part_of_s,system_create_dt,
111
+ person_0_role_t,person_1_role_t,person_2_role_t,person_3_role_t,person_4_role_t,person_5_role_t,person_6_role_t,
112
+ person_7_role_t,person_8_role_t,person_9_role_t,
113
+ person_0_first_name_t,person_1_first_name_t,person_2_first_name_t,person_3_first_name_t,person_4_first_name_t,
114
+ person_5_first_name_t,person_6_first_name_t,person_7_first_name_t,person_8_first_name_t,person_9_first_name_t,
115
+ person_0_last_name_t,person_1_last_name_t,person_2_last_name_t,person_3_last_name_t,person_4_last_name_t,
116
+ person_5_last_name_t,person_6_last_name_t,person_7_last_name_t,person_8_last_name_t,person_9_last_name_t,
117
+ status_t,subject_t,depositor_t,
118
+ journal_title_info_t,journal_issue_publication_date_t,
119
+ journal_issue_pages_end_t,journal_issue_volume_t,journal_title_info_main_title_t,journal_issue_pages_start_t,
120
+ journal_issue_start_page_t, journal_issue_end_page_t, abstract_t,
121
+ person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
122
+ person_7_institution_t,person_8_institution_t,person_9_institution_t,
123
+ mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
124
+ mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_main_title_t, mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
125
+ object_type_facet, department_facet, peer_reviewed_facet
126
+ </str>
127
+ </lst>
128
+ </requestHandler>
129
+
130
+ <requestHandler name="public_search" class="solr.SearchHandler" >
131
+ <lst name="defaults">
132
+ <!-- Making defType lucene to exclude file assets -->
133
+ <str name="defType">lucene</str>
134
+ <!-- lucene params -->
135
+ <str name="df">has_model_s</str>
136
+ <str name="q.op">AND</str>
137
+ <!-- dismax params -->
138
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
139
+ <str name="q.alt">*:*</str>
140
+ <str name="qf_dismax">id^0.8 id_t^0.8 format text^0.3</str>
141
+ <str name="pf_dismax">id^0.9 id_t^0.9 text^0.5</str>
142
+ <int name="ps">100</int>
143
+ <float name="tie">0.01</float>
144
+ <!-- general -->
145
+ <str name="facet">on</str>
146
+ <str name="facet.mincount">1</str>
147
+ <str name="echoParams">explicit</str>
148
+ <str name="fl">
149
+ id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet,has_model_s,has_collection_member_s,system_create_dt,
150
+ person_0_role_t,person_1_role_t,person_2_role_t,person_3_role_t,person_4_role_t,person_5_role_t,person_6_role_t,person_7_role_t,person_8_role_t,person_9_role_t,
151
+ person_0_first_name_t,person_1_first_name_t,person_2_first_name_t,person_3_first_name_t,person_4_first_name_t,person_5_first_name_t,person_6_first_name_t,person_7_first_name_t,person_8_first_name_t,person_9_first_name_t,
152
+ person_0_last_name_t,person_1_last_name_t,person_2_last_name_t,person_3_last_name_t,person_4_last_name_t,person_5_last_name_t,person_6_last_name_t,person_7_last_name_t,person_8_last_name_t,person_9_last_name_t,depositor_t,
153
+
154
+ journal_title_info_t, journal_title_info_main_title_t, journal_issue_publication_date_t, journal_issue_pages_start_t, journal_issue_pages_end_t, journal_issue_volume_t, journal_issue_start_page_t, journal_issue_end_page_t, abstract_t,
155
+ person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
156
+ person_7_institution_t,person_8_institution_t,person_9_institution_t,
157
+ mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
158
+ mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_t,mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
159
+ object_type_facet, department_facet, peer_reviewed_facet
160
+ </str>
161
+ </lst>
162
+ </requestHandler>
163
+
164
+ <requestHandler name="fulltext" class="solr.SearchHandler" >
165
+ <lst name="defaults">
166
+ <str name="defType">dismax</str>
167
+ <str name="facet">on</str>
168
+ <str name="facet.mincount">1</str>
169
+ <str name="echoParams">explicit</str>
170
+ <float name="tie">0.01</float>
171
+ <str name="qf">id^0.8 id_t^0.8 format text^0.3</str>
172
+ <str name="pf">id^0.9 id_t^0.9 text^0.5</str>
173
+ <str name="fl">
174
+ id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet
175
+ </str>
176
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
177
+ <int name="ps">100</int>
178
+ <str name="q.alt">*:*</str>
179
+ </lst>
180
+ </requestHandler>
181
+
182
+ <!--
183
+ Hydra Permissions request Handler
184
+ For requests to get just the permissions related info about a document
185
+ -->
186
+ <requestHandler name="permissions" class="solr.SearchHandler" >
187
+ <lst name="defaults">
188
+ <str name="facet">off</str>
189
+ <str name="echoParams">all</str>
190
+ <str name="rows">1</str>
191
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
192
+ <str name="fl">
193
+ id,access_t,
194
+ discover_access_group_t,discover_access_person_t,
195
+ read_access_group_t,read_access_person_t,
196
+ edit_access_group_t,edit_access_person_t,
197
+ depositor_t,
198
+ embargo_release_date_dt
199
+ </str>
200
+ </lst>
201
+ </requestHandler>
202
+
203
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
204
+ <requestHandler name="document" class="solr.SearchHandler" >
205
+ <lst name="defaults">
206
+ <str name="echoParams">all</str>
207
+ <str name="fl">*</str>
208
+ <str name="rows">1</str>
209
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
210
+
211
+ <!-- facets on for a single document response??? -->
212
+ <str name="facet">on</str>
213
+ <str name="facet.mincount">1</str>
214
+
215
+ <str name="facet.field">collection_facet</str>
216
+ <str name="facet.field">technology_facet</str>
217
+ <str name="facet.field">person_facet</str>
218
+ <!-- <str name="facet.field">title_t</str> -->
219
+ <str name="facet.field">city_facet</str>
220
+ <str name="facet.field">organization_facet</str>
221
+ <str name="facet.field">company_facet</str>
222
+ <str name="facet.field">year_facet</str>
223
+ <str name="facet.field">state_facet</str>
224
+ <str name="facet.field">series_facet</str>
225
+ <str name="facet.field">box_facet</str>
226
+ <str name="facet.field">folder_facet</str>
227
+ <str name="facet.field">donor_tags_facet</str>
228
+ <str name="facet.field">archivist_tags_facet</str>
229
+
230
+ </lst>
231
+ </requestHandler>
232
+
233
+ <!-- The spell check component can return a list of alternative spelling
234
+ suggestions. -->
235
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
236
+
237
+ <str name="queryAnalyzerFieldType">textSpell</str>
238
+
239
+ <lst name="spellchecker">
240
+ <str name="name">default</str>
241
+ <str name="field">spell</str>
242
+ <str name="spellcheckIndexDir">./spellchecker1</str>
243
+
244
+ </lst>
245
+ <lst name="spellchecker">
246
+ <str name="name">jarowinkler</str>
247
+ <str name="field">spell</str>
248
+ <!-- Use a different Distance Measure -->
249
+ <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
250
+ <str name="spellcheckIndexDir">./spellchecker2</str>
251
+
252
+ </lst>
253
+
254
+ <lst name="spellchecker">
255
+ <str name="classname">solr.FileBasedSpellChecker</str>
256
+ <str name="name">file</str>
257
+ <str name="sourceLocation">spellings.txt</str>
258
+ <str name="characterEncoding">UTF-8</str>
259
+ <str name="spellcheckIndexDir">./spellcheckerFile</str>
260
+ </lst>
261
+ </searchComponent>
262
+
263
+ <!-- a request handler utilizing the spellcheck component -->
264
+ <requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
265
+ <lst name="defaults">
266
+ <!-- omp = Only More Popular -->
267
+ <str name="spellcheck.onlyMorePopular">false</str>
268
+ <!-- exr = Extended Results -->
269
+ <str name="spellcheck.extendedResults">false</str>
270
+ <!-- The number of suggestions to return -->
271
+ <str name="spellcheck.count">1</str>
272
+ </lst>
273
+ <arr name="last-components">
274
+ <str>spellcheck</str>
275
+ </arr>
276
+ </requestHandler>
277
+
278
+ <!-- a search component that enables you to configure the top results for
279
+ a given query regardless of the normal lucene scoring.-->
280
+ <searchComponent name="elevator" class="solr.QueryElevationComponent" >
281
+ <!-- pick a fieldType to analyze queries -->
282
+ <str name="queryFieldType">string</str>
283
+ <str name="config-file">elevate.xml</str>
284
+ </searchComponent>
285
+
286
+ <!-- a request handler utilizing the elevator component -->
287
+ <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
288
+ <lst name="defaults">
289
+ <str name="echoParams">explicit</str>
290
+ </lst>
291
+ <arr name="last-components">
292
+ <str>elevator</str>
293
+ </arr>
294
+ </requestHandler>
295
+
296
+ <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
297
+ <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
298
+ <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
299
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
300
+ <requestHandler name="/admin/ping" class="PingRequestHandler">
301
+ <lst name="defaults">
302
+ <str name="qt">standard</str>
303
+ <str name="q">solrpingquery</str>
304
+ <str name="echoParams">all</str>
305
+ </lst>
306
+ </requestHandler>
307
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
308
+ <lst name="defaults">
309
+ <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
310
+ <str name="echoHandler">true</str>
311
+ </lst>
312
+ </requestHandler>
313
+
314
+ <!--
315
+ <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
316
+ <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
317
+ <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
318
+ -->
319
+
320
+ <!-- XSLT response writer transforms the XML output by any xslt file found
321
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
322
+ every xsltCacheLifetimeSeconds.
323
+ -->
324
+ <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
325
+ <int name="xsltCacheLifetimeSeconds">5</int>
326
+ </queryResponseWriter>
327
+
328
+ <admin>
329
+ <defaultQuery>hydra</defaultQuery>
330
+ </admin>
331
+
332
+ </config>