hydra_mediated 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +7 -0
  5. data/HYDRA_MEDIATED_VERSION +1 -0
  6. data/README.md +36 -0
  7. data/Rakefile +5 -0
  8. data/app/assets/images/blacklight/bg.png +0 -0
  9. data/app/assets/images/blacklight/border.png +0 -0
  10. data/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
  11. data/app/assets/images/blacklight/checkmark.gif +0 -0
  12. data/app/assets/images/blacklight/logo.png +0 -0
  13. data/app/assets/images/blacklight/magnifying_glass.gif +0 -0
  14. data/app/assets/images/blacklight/remove.gif +0 -0
  15. data/app/assets/images/blacklight/separator.gif +0 -0
  16. data/app/assets/images/blacklight/start_over.gif +0 -0
  17. data/app/assets/images/rails.png +0 -0
  18. data/app/assets/javascripts/application.js +17 -0
  19. data/app/assets/javascripts/items.js.coffee +3 -0
  20. data/app/assets/stylesheets/application.css +14 -0
  21. data/app/assets/stylesheets/blacklight.css.scss +4 -0
  22. data/app/assets/stylesheets/items.css.scss +3 -0
  23. data/app/controllers/application_controller.rb +10 -0
  24. data/app/controllers/catalog_controller.rb +165 -0
  25. data/app/controllers/items_controller.rb +34 -0
  26. data/app/controllers/submissions_controller.rb +7 -0
  27. data/app/helpers/application_helper.rb +2 -0
  28. data/app/helpers/items_helper.rb +5 -0
  29. data/app/mailers/.gitkeep +0 -0
  30. data/app/models/.gitkeep +0 -0
  31. data/app/models/ability.rb +3 -0
  32. data/app/models/ead.rb +3 -0
  33. data/app/models/etd.rb +3 -0
  34. data/app/models/generic.rb +3 -0
  35. data/app/models/generic_file.rb +3 -0
  36. data/app/models/item.rb +4 -0
  37. data/app/models/solr_document.rb +33 -0
  38. data/app/models/user.rb +22 -0
  39. data/app/views/catalog/_home_text.html.erb +9 -0
  40. data/app/views/catalog/_show_tools.html.erb +44 -0
  41. data/app/views/devise/confirmations/new.html.erb +12 -0
  42. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  43. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  44. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  45. data/app/views/devise/passwords/edit.html.erb +16 -0
  46. data/app/views/devise/passwords/new.html.erb +12 -0
  47. data/app/views/devise/registrations/edit.html.erb +29 -0
  48. data/app/views/devise/registrations/new.html.erb +18 -0
  49. data/app/views/devise/sessions/new.html.erb +17 -0
  50. data/app/views/devise/shared/_links.erb +25 -0
  51. data/app/views/devise/unlocks/new.html.erb +12 -0
  52. data/app/views/items/done.html.erb +3 -0
  53. data/app/views/items/edit.html.erb +25 -0
  54. data/app/views/items/new.html.erb +22 -0
  55. data/app/views/items/submit.html.erb +6 -0
  56. data/app/views/items/upload.html.erb +5 -0
  57. data/app/views/layouts/application.html.erb +14 -0
  58. data/app/views/submissions/new.html.erb +13 -0
  59. data/config.ru +4 -0
  60. data/config/SolrMarc/config-test.properties +37 -0
  61. data/config/SolrMarc/config.properties +37 -0
  62. data/config/SolrMarc/index.properties +97 -0
  63. data/config/SolrMarc/index_scripts/dewey.bsh +47 -0
  64. data/config/SolrMarc/index_scripts/format.bsh +126 -0
  65. data/config/SolrMarc/translation_maps/README_MAPS +1 -0
  66. data/config/SolrMarc/translation_maps/callnumber_map.properties +407 -0
  67. data/config/SolrMarc/translation_maps/composition_era_map.properties +56 -0
  68. data/config/SolrMarc/translation_maps/country_map.properties +379 -0
  69. data/config/SolrMarc/translation_maps/format_map.properties +50 -0
  70. data/config/SolrMarc/translation_maps/instrument_map.properties +101 -0
  71. data/config/SolrMarc/translation_maps/language_map.properties +490 -0
  72. data/config/application.rb +66 -0
  73. data/config/boot.rb +6 -0
  74. data/config/database.yml +25 -0
  75. data/config/environment.rb +5 -0
  76. data/config/locales/devise.en.yml +59 -0
  77. data/config/locales/en.yml +5 -0
  78. data/config/routes.rb +20 -0
  79. data/db/migrate/20130606160529_devise_create_users.rb +46 -0
  80. data/db/migrate/20130606160531_add_devise_guests_to_users.rb +15 -0
  81. data/db/migrate/20130606160536_create_searches.rb +16 -0
  82. data/db/migrate/20130606160537_create_bookmarks.rb +18 -0
  83. data/db/migrate/20130606160538_remove_editable_fields_from_bookmarks.rb +12 -0
  84. data/db/migrate/20130606160539_add_user_types_to_bookmarks_searches.rb +16 -0
  85. data/db/schema.rb +54 -0
  86. data/db/seeds.rb +7 -0
  87. data/doc/README_FOR_APP +2 -0
  88. data/fedora_conf/conf/development/fedora.fcfg +953 -0
  89. data/fedora_conf/conf/test/fedora.fcfg +953 -0
  90. data/hydra_mediated.gemspec +22 -0
  91. data/lib/assets/.gitkeep +0 -0
  92. data/lib/hydra/mediated/ability.rb +17 -0
  93. data/lib/hydra/mediated/generic_file.rb +13 -0
  94. data/lib/hydra/mediated/item.rb +35 -0
  95. data/lib/hydra_mediated.rb +21 -0
  96. data/lib/tasks/.gitkeep +0 -0
  97. data/log/.gitkeep +0 -0
  98. data/public/404.html +26 -0
  99. data/public/422.html +26 -0
  100. data/public/500.html +25 -0
  101. data/public/favicon.ico +0 -0
  102. data/public/robots.txt +5 -0
  103. data/script/rails +6 -0
  104. data/solr_conf/conf/schema.xml +273 -0
  105. data/solr_conf/conf/solrconfig.xml +167 -0
  106. data/solr_conf/solr.xml +35 -0
  107. data/spec/controllers/items_controller_spec.rb +56 -0
  108. data/spec/helpers/items_helper_spec.rb +8 -0
  109. data/spec/models/ability_spec.rb +24 -0
  110. data/spec/models/item_spec.rb +26 -0
  111. data/spec/spec_helper.rb +33 -0
  112. data/test/fixtures/.gitkeep +0 -0
  113. data/test/fixtures/users.yml +11 -0
  114. data/test/functional/.gitkeep +0 -0
  115. data/test/integration/.gitkeep +0 -0
  116. data/test/performance/browsing_test.rb +12 -0
  117. data/test/test_helper.rb +13 -0
  118. data/test/unit/.gitkeep +0 -0
  119. data/test/unit/user_test.rb +7 -0
  120. data/vendor/assets/javascripts/.gitkeep +0 -0
  121. data/vendor/assets/stylesheets/.gitkeep +0 -0
  122. data/vendor/plugins/.gitkeep +0 -0
  123. metadata +222 -0
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ version = File.read(File.expand_path("../HYDRA_MEDIATED_VERSION",__FILE__)).strip
3
+
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.authors = ["Justin Coyne"]
7
+ gem.email = ["justin@curationexperts.com"]
8
+ gem.description = %q{hydra_mediated is a Rails engine for creating a self-deposit institutional repository}
9
+ gem.summary = %q{hydra_mediated is a Rails engine for creating a self-deposit institutional repository}
10
+ gem.homepage = ""
11
+
12
+ gem.files = `git ls-files`.split($\)
13
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
+ gem.name = "hydra_mediated"
16
+ gem.require_paths = ["lib"]
17
+ gem.version = version
18
+
19
+ gem.add_dependency 'hydra'
20
+ gem.add_dependency 'sufia-models'
21
+ gem.add_dependency 'hydra-editor'
22
+ end
File without changes
@@ -0,0 +1,17 @@
1
+ module Hydra
2
+ module Mediated
3
+ module Ability
4
+
5
+ extend ActiveSupport::Concern
6
+ include Hydra::Ability
7
+
8
+ def custom_permissions
9
+ can [:create, :edit, :upload, :update, :submit, :done, :destroy], Item
10
+ end
11
+
12
+ def create_permissions
13
+ # nop - override default behavior which allows any registered user to create
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ module Hydra
2
+ module Mediated
3
+ module GenericFile
4
+ extend ActiveSupport::Concern
5
+ include Sufia::GenericFile
6
+
7
+ included do
8
+ belongs_to :item, :property => :has_many
9
+ end
10
+ end
11
+ end
12
+ end
13
+
@@ -0,0 +1,35 @@
1
+ module Hydra
2
+ module Mediated
3
+ module Item
4
+ extend ActiveSupport::Concern
5
+ included do
6
+ has_many :generic_files, :property => :has_many
7
+ has_metadata :name => "descMetadata", :type => GenericFileRdfDatastream
8
+
9
+ delegate_to :descMetadata, [:date_uploaded, :date_modified], unique: true
10
+ delegate_to :descMetadata, [:related_url, :based_near, :part_of, :creator,
11
+ :contributor, :title, :tag, :description, :rights,
12
+ :publisher, :date_created, :subject,
13
+ :resource_type, :identifier, :language]
14
+
15
+ # TODO this should become a relationship to an administrative collection.
16
+ attr_accessor :administrative_collection_id
17
+
18
+ end
19
+
20
+ include Sufia::GenericFile::WebForm
21
+
22
+ def terms_for_editing
23
+ [:title, :creator, :description, :subject, :date_created]
24
+ end
25
+
26
+ module ClassMethods
27
+ def available_resource_types
28
+ {'Thesis or dissertation' => 'ETD',
29
+ "Collection guide" => "EAD",
30
+ "Generic object" => "Generic"}
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,21 @@
1
+ require 'hydra-editor'
2
+ module Hydra
3
+ module Mediated
4
+ extend ActiveSupport::Autoload
5
+ autoload :Ability
6
+ autoload :Item
7
+ end
8
+ end
9
+
10
+ module HydraMediated
11
+ extend ActiveSupport::Autoload
12
+ class Engine < ::Rails::Engine
13
+ engine_name 'mediated'
14
+
15
+ # These lines are probably unnecessary in rails 4
16
+ config.autoload_paths += %W(
17
+ #{config.root}/app/controllers/concerns
18
+ #{config.root}/app/models/concerns
19
+ )
20
+ end
21
+ end
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,273 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema name="Hydra" version="1.5">
3
+ <!-- NOTE: various comments and unused configuration possibilities have been purged
4
+ from this file. Please refer to http://wiki.apache.org/solr/SchemaXml,
5
+ as well as the default schema file included with Solr -->
6
+
7
+ <uniqueKey>id</uniqueKey>
8
+
9
+ <fields>
10
+ <field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true"/>
11
+ <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
12
+
13
+ <field name="lat" type="tdouble" stored="true" indexed="true" multiValued="false"/>
14
+ <field name="lng" type="tdouble" stored="true" indexed="true" multiValued="false"/>
15
+
16
+ <!-- NOTE: not all possible Solr field types are represented in the dynamic fields -->
17
+
18
+ <!-- text (_t...) -->
19
+ <dynamicField name="*_ti" type="text" stored="false" indexed="true" multiValued="false"/>
20
+ <dynamicField name="*_tim" type="text" stored="false" indexed="true" multiValued="true"/>
21
+ <dynamicField name="*_ts" type="text" stored="true" indexed="false" multiValued="false"/>
22
+ <dynamicField name="*_tsm" type="text" stored="true" indexed="false" multiValued="true"/>
23
+ <dynamicField name="*_tsi" type="text" stored="true" indexed="true" multiValued="false"/>
24
+ <dynamicField name="*_tsim" type="text" stored="true" indexed="true" multiValued="true"/>
25
+ <dynamicField name="*_tiv" type="text" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
26
+ <dynamicField name="*_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
27
+ <dynamicField name="*_tsiv" type="text" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
28
+ <dynamicField name="*_tsimv" type="text" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
29
+
30
+ <!-- English text (_te...) -->
31
+ <dynamicField name="*_tei" type="text_en" stored="false" indexed="true" multiValued="false"/>
32
+ <dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true"/>
33
+ <dynamicField name="*_tes" type="text_en" stored="true" indexed="false" multiValued="false"/>
34
+ <dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true"/>
35
+ <dynamicField name="*_tesi" type="text_en" stored="true" indexed="true" multiValued="false"/>
36
+ <dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true"/>
37
+ <dynamicField name="*_teiv" type="text_en" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
38
+ <dynamicField name="*_teimv" type="text_en" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
39
+ <dynamicField name="*_tesiv" type="text_en" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
40
+ <dynamicField name="*_tesimv" type="text_en" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
41
+
42
+ <!-- string (_s...) -->
43
+ <dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false"/>
44
+ <dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true"/>
45
+ <dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
46
+ <dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
47
+ <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
48
+ <dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
49
+ <dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
50
+
51
+ <!-- integer (_i...) -->
52
+ <dynamicField name="*_ii" type="int" stored="false" indexed="true" multiValued="false"/>
53
+ <dynamicField name="*_iim" type="int" stored="false" indexed="true" multiValued="true"/>
54
+ <dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
55
+ <dynamicField name="*_ism" type="int" stored="true" indexed="false" multiValued="true"/>
56
+ <dynamicField name="*_isi" type="int" stored="true" indexed="true" multiValued="false"/>
57
+ <dynamicField name="*_isim" type="int" stored="true" indexed="true" multiValued="true"/>
58
+
59
+ <!-- trie integer (_it...) (for faster range queries) -->
60
+ <dynamicField name="*_iti" type="tint" stored="false" indexed="true" multiValued="false"/>
61
+ <dynamicField name="*_itim" type="tint" stored="false" indexed="true" multiValued="true"/>
62
+ <dynamicField name="*_its" type="tint" stored="true" indexed="false" multiValued="false"/>
63
+ <dynamicField name="*_itsm" type="tint" stored="true" indexed="false" multiValued="true"/>
64
+ <dynamicField name="*_itsi" type="tint" stored="true" indexed="true" multiValued="false"/>
65
+ <dynamicField name="*_itsim" type="tint" stored="true" indexed="true" multiValued="true"/>
66
+
67
+ <!-- date (_dt...) -->
68
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
69
+ Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z -->
70
+ <dynamicField name="*_dti" type="date" stored="false" indexed="true" multiValued="false"/>
71
+ <dynamicField name="*_dtim" type="date" stored="false" indexed="true" multiValued="true"/>
72
+ <dynamicField name="*_dts" type="date" stored="true" indexed="false" multiValued="false"/>
73
+ <dynamicField name="*_dtsm" type="date" stored="true" indexed="false" multiValued="true"/>
74
+ <dynamicField name="*_dtsi" type="date" stored="true" indexed="true" multiValued="false"/>
75
+ <dynamicField name="*_dtsim" type="date" stored="true" indexed="true" multiValued="true"/>
76
+
77
+ <!-- trie date (_dtt...) (for faster range queries) -->
78
+ <dynamicField name="*_dtti" type="tdate" stored="false" indexed="true" multiValued="false"/>
79
+ <dynamicField name="*_dttim" type="tdate" stored="false" indexed="true" multiValued="true"/>
80
+ <dynamicField name="*_dtts" type="tdate" stored="true" indexed="false" multiValued="false"/>
81
+ <dynamicField name="*_dttsm" type="tdate" stored="true" indexed="false" multiValued="true"/>
82
+ <dynamicField name="*_dttsi" type="tdate" stored="true" indexed="true" multiValued="false"/>
83
+ <dynamicField name="*_dttsim" type="tdate" stored="true" indexed="true" multiValued="true"/>
84
+
85
+ <!-- long (_l...) -->
86
+ <dynamicField name="*_li" type="long" stored="false" indexed="true" multiValued="false"/>
87
+ <dynamicField name="*_lim" type="long" stored="false" indexed="true" multiValued="true"/>
88
+ <dynamicField name="*_ls" type="long" stored="true" indexed="false" multiValued="false"/>
89
+ <dynamicField name="*_lsm" type="long" stored="true" indexed="false" multiValued="true"/>
90
+ <dynamicField name="*_lsi" type="long" stored="true" indexed="true" multiValued="false"/>
91
+ <dynamicField name="*_lsim" type="long" stored="true" indexed="true" multiValued="true"/>
92
+
93
+ <!-- trie long (_lt...) (for faster range queries) -->
94
+ <dynamicField name="*_lti" type="tlong" stored="false" indexed="true" multiValued="false"/>
95
+ <dynamicField name="*_ltim" type="tlong" stored="false" indexed="true" multiValued="true"/>
96
+ <dynamicField name="*_lts" type="tlong" stored="true" indexed="false" multiValued="false"/>
97
+ <dynamicField name="*_ltsm" type="tlong" stored="true" indexed="false" multiValued="true"/>
98
+ <dynamicField name="*_ltsi" type="tlong" stored="true" indexed="true" multiValued="false"/>
99
+ <dynamicField name="*_ltsim" type="tlong" stored="true" indexed="true" multiValued="true"/>
100
+
101
+ <!-- double (_db...) -->
102
+ <dynamicField name="*_dbi" type="double" stored="false" indexed="true" multiValued="false"/>
103
+ <dynamicField name="*_dbim" type="double" stored="false" indexed="true" multiValued="true"/>
104
+ <dynamicField name="*_dbs" type="double" stored="true" indexed="false" multiValued="false"/>
105
+ <dynamicField name="*_dbsm" type="double" stored="true" indexed="false" multiValued="true"/>
106
+ <dynamicField name="*_dbsi" type="double" stored="true" indexed="true" multiValued="false"/>
107
+ <dynamicField name="*_dbsim" type="double" stored="true" indexed="true" multiValued="true"/>
108
+
109
+ <!-- trie double (_dbt...) (for faster range queries) -->
110
+ <dynamicField name="*_dbti" type="tdouble" stored="false" indexed="true" multiValued="false"/>
111
+ <dynamicField name="*_dbtim" type="tdouble" stored="false" indexed="true" multiValued="true"/>
112
+ <dynamicField name="*_dbts" type="tdouble" stored="true" indexed="false" multiValued="false"/>
113
+ <dynamicField name="*_dbtsm" type="tdouble" stored="true" indexed="false" multiValued="true"/>
114
+ <dynamicField name="*_dbtsi" type="tdouble" stored="true" indexed="true" multiValued="false"/>
115
+ <dynamicField name="*_dbtsim" type="tdouble" stored="true" indexed="true" multiValued="true"/>
116
+
117
+ <!-- float (_f...) -->
118
+ <dynamicField name="*_fi" type="float" stored="false" indexed="true" multiValued="false"/>
119
+ <dynamicField name="*_fim" type="float" stored="false" indexed="true" multiValued="true"/>
120
+ <dynamicField name="*_fs" type="float" stored="true" indexed="false" multiValued="false"/>
121
+ <dynamicField name="*_fsm" type="float" stored="true" indexed="false" multiValued="true"/>
122
+ <dynamicField name="*_fsi" type="float" stored="true" indexed="true" multiValued="false"/>
123
+ <dynamicField name="*_fsim" type="float" stored="true" indexed="true" multiValued="true"/>
124
+
125
+ <!-- trie float (_ft...) (for faster range queries) -->
126
+ <dynamicField name="*_fti" type="tfloat" stored="false" indexed="true" multiValued="false"/>
127
+ <dynamicField name="*_ftim" type="tfloat" stored="false" indexed="true" multiValued="true"/>
128
+ <dynamicField name="*_fts" type="tfloat" stored="true" indexed="false" multiValued="false"/>
129
+ <dynamicField name="*_ftsm" type="tfloat" stored="true" indexed="false" multiValued="true"/>
130
+ <dynamicField name="*_ftsi" type="tfloat" stored="true" indexed="true" multiValued="false"/>
131
+ <dynamicField name="*_ftsim" type="tfloat" stored="true" indexed="true" multiValued="true"/>
132
+
133
+ <!-- boolean (_b...) -->
134
+ <dynamicField name="*_bi" type="boolean" stored="false" indexed="true" multiValued="false"/>
135
+ <dynamicField name="*_bs" type="boolean" stored="true" indexed="false" multiValued="false"/>
136
+ <dynamicField name="*_bsi" type="boolean" stored="true" indexed="true" multiValued="false"/>
137
+
138
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
139
+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
140
+
141
+ <!-- location (_ll...) -->
142
+ <dynamicField name="*_lli" type="location" stored="false" indexed="true" multiValued="false"/>
143
+ <dynamicField name="*_llim" type="location" stored="false" indexed="true" multiValued="true"/>
144
+ <dynamicField name="*_lls" type="location" stored="true" indexed="false" multiValued="false"/>
145
+ <dynamicField name="*_llsm" type="location" stored="true" indexed="false" multiValued="true"/>
146
+ <dynamicField name="*_llsi" type="location" stored="true" indexed="true" multiValued="false"/>
147
+ <dynamicField name="*_llsim" type="location" stored="true" indexed="true" multiValued="true"/>
148
+
149
+ <!-- you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
150
+ <field name="all_text_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
151
+
152
+
153
+ </fields>
154
+
155
+
156
+ <!-- Above, multiple source fields are copied to the [text] field.
157
+ Another way to map multiple source fields to the same
158
+ destination field is to use the dynamic field syntax.
159
+ copyField also supports a maxChars to copy setting. -->
160
+
161
+ <!-- <copyField source="*_tesim" dest="all_text_timv" maxChars="3000"/> -->
162
+
163
+ <types>
164
+ <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
165
+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
166
+ <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
167
+
168
+ <!-- Default numeric field types. -->
169
+ <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
170
+ <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
171
+ <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
172
+ <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
173
+
174
+ <!-- trie numeric field types for faster range queries -->
175
+ <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
176
+ <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
177
+ <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
178
+ <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
179
+
180
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
181
+ Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
182
+ -->
183
+ <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
184
+ <!-- A Trie based date field for faster date range queries and date faceting. -->
185
+ <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
186
+
187
+
188
+ <!-- This point type indexes the coordinates as separate fields (subFields)
189
+ If subFieldType is defined, it references a type, and a dynamic field
190
+ definition is created matching *___<typename>. Alternately, if
191
+ subFieldSuffix is defined, that is used to create the subFields.
192
+ Example: if subFieldType="double", then the coordinates would be
193
+ indexed in fields myloc_0___double,myloc_1___double.
194
+ Example: if subFieldSuffix="_d" then the coordinates would be indexed
195
+ in fields myloc_0_d,myloc_1_d
196
+ The subFields are an implementation detail of the fieldType, and end
197
+ users normally should not need to know about them.
198
+ -->
199
+ <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
200
+
201
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
202
+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
203
+
204
+ <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
205
+ For more information about this and other Spatial fields new to Solr 4, see:
206
+ http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
207
+ -->
208
+ <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
209
+ geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
210
+
211
+ <fieldType name="text" class="solr.TextField" omitNorms="false">
212
+ <analyzer>
213
+ <tokenizer class="solr.ICUTokenizerFactory"/>
214
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
215
+ <filter class="solr.TrimFilterFactory"/>
216
+ </analyzer>
217
+ </fieldType>
218
+
219
+ <!-- A text field that only splits on whitespace for exact matching of words -->
220
+ <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
221
+ <analyzer>
222
+ <tokenizer class="solr.WhitespaceTokenizerFactory"/>
223
+ <filter class="solr.TrimFilterFactory"/>
224
+ </analyzer>
225
+ </fieldType>
226
+
227
+ <!-- single token analyzed text, for sorting. Punctuation is significant. -->
228
+ <fieldtype name="alphaSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
229
+ <analyzer>
230
+ <tokenizer class="solr.KeywordTokenizerFactory" />
231
+ <filter class="solr.ICUFoldingFilterFactory"/>
232
+ <filter class="solr.TrimFilterFactory" />
233
+ </analyzer>
234
+ </fieldtype>
235
+
236
+ <!-- A text field with defaults appropriate for English -->
237
+ <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
238
+ <analyzer>
239
+ <tokenizer class="solr.ICUTokenizerFactory"/>
240
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
241
+ <filter class="solr.EnglishPossessiveFilterFactory"/>
242
+ <!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
243
+ <filter class="solr.EnglishMinimalStemFilterFactory"/>
244
+ <!--
245
+ <filter class="solr.PorterStemFilterFactory"/>
246
+ -->
247
+ <filter class="solr.TrimFilterFactory"/>
248
+ </analyzer>
249
+ </fieldType>
250
+
251
+ <!-- queries for paths match documents at that path, or in descendent paths -->
252
+ <fieldType name="descendent_path" class="solr.TextField">
253
+ <analyzer type="index">
254
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
255
+ </analyzer>
256
+ <analyzer type="query">
257
+ <tokenizer class="solr.KeywordTokenizerFactory" />
258
+ </analyzer>
259
+ </fieldType>
260
+
261
+ <!-- queries for paths match documents at that path, or in ancestor paths -->
262
+ <fieldType name="ancestor_path" class="solr.TextField">
263
+ <analyzer type="index">
264
+ <tokenizer class="solr.KeywordTokenizerFactory" />
265
+ </analyzer>
266
+ <analyzer type="query">
267
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
268
+ </analyzer>
269
+ </fieldType>
270
+
271
+ </types>
272
+
273
+ </schema>