sufia 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.travis.yml +6 -0
  4. data/Gemfile +5 -2
  5. data/History.md +6 -0
  6. data/README.md +40 -0
  7. data/Rakefile +4 -0
  8. data/app/assets/javascripts/sufia.js +3 -115
  9. data/app/assets/javascripts/sufia/batch_select_all.js +179 -0
  10. data/app/assets/javascripts/sufia/edit_metadata.js +86 -0
  11. data/app/assets/javascripts/sufia/multiForm.js +57 -0
  12. data/app/assets/javascripts/terms_of_service.js +7 -0
  13. data/app/assets/stylesheets/audio-js.css +3 -0
  14. data/app/assets/stylesheets/dashboard.css.scss +51 -0
  15. data/app/assets/stylesheets/generic_files.css +36 -0
  16. data/app/assets/stylesheets/sufia.css.scss +2 -0
  17. data/app/controllers/batch_controller.rb +11 -0
  18. data/app/controllers/batch_edits_controller.rb +1 -77
  19. data/app/controllers/generic_files_controller.rb +1 -0
  20. data/app/controllers/mailbox_controller.rb +1 -1
  21. data/app/controllers/single_use_link_controller.rb +11 -7
  22. data/app/helpers/generic_file_helper.rb +11 -3
  23. data/app/helpers/sufia_helper.rb +13 -10
  24. data/app/models/batch.rb +1 -1
  25. data/app/models/datastreams/fits_datastream.rb +2 -2
  26. data/app/models/datastreams/generic_file_rdf_datastream.rb +22 -18
  27. data/app/models/datastreams/properties_datastream.rb +2 -2
  28. data/app/views/_user_util_links.html.erb +2 -2
  29. data/app/views/batch/_metadata.html.erb +82 -0
  30. data/app/views/batch/_more_metadata.html.erb +6 -0
  31. data/app/views/batch/edit.html.erb +1 -8
  32. data/app/views/batch_edits/_check_all.html.erb +0 -157
  33. data/app/views/batch_edits/edit.html.erb +0 -29
  34. data/app/views/catalog/_index_partials/_list_files.html.erb +8 -10
  35. data/app/views/catalog/_recent_document.html.erb +9 -18
  36. data/app/views/catalog/_results_pagination.html.erb +1 -1
  37. data/app/views/contact_form/new.html.erb +1 -1
  38. data/app/views/dashboard/_index_partials/_default_group.html.erb +1 -1
  39. data/app/views/dashboard/_index_partials/_list_files.html.erb +12 -14
  40. data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +9 -19
  41. data/app/views/dashboard/_results_pagination.html.erb +1 -1
  42. data/app/views/dashboard/index.html.erb +6 -82
  43. data/app/views/error/single_use_error.html.erb +35 -0
  44. data/app/views/generic_files/_descriptions.html.erb +2 -2
  45. data/app/views/generic_files/_extra_fields_modal.html.erb +1 -1
  46. data/app/views/generic_files/_field_form.html.erb +2 -5
  47. data/app/views/generic_files/_media_display.html.erb +8 -6
  48. data/app/views/generic_files/_permission.html.erb +2 -2
  49. data/app/views/generic_files/_rights_modal.html.erb +1 -1
  50. data/app/views/generic_files/_show_actions.html.erb +1 -1
  51. data/app/views/generic_files/_show_details.html.erb +11 -6
  52. data/app/views/generic_files/edit.html.erb +0 -8
  53. data/app/views/generic_files/edit_fields/_type.html.erb +1 -1
  54. data/app/views/generic_files/show.html.erb +5 -8
  55. data/app/views/generic_files/show_fields/_based_near.html.erb +4 -1
  56. data/app/views/generic_files/show_fields/_contributor.html.erb +4 -1
  57. data/app/views/generic_files/show_fields/_creator.html.erb +4 -1
  58. data/app/views/generic_files/show_fields/_date_created.html.erb +4 -1
  59. data/app/views/generic_files/show_fields/_description.html.erb +4 -1
  60. data/app/views/generic_files/show_fields/_language.html.erb +1 -1
  61. data/app/views/generic_files/show_fields/_publisher.html.erb +4 -1
  62. data/app/views/generic_files/show_fields/_related_url.html.erb +3 -1
  63. data/app/views/generic_files/show_fields/_resource_type.html.erb +1 -1
  64. data/app/views/generic_files/show_fields/_subject.html.erb +4 -1
  65. data/app/views/generic_files/show_fields/_tag.html.erb +1 -1
  66. data/app/views/generic_files/show_fields/_title.html.erb +4 -1
  67. data/app/views/layouts/error.html.erb +0 -4
  68. data/app/views/layouts/hydra-head.html.erb +2 -6
  69. data/app/views/single_use_link/show.html.erb +1 -1
  70. data/app/views/users/index.html.erb +1 -1
  71. data/app/views/users/show.html.erb +1 -1
  72. data/config/locales/sufia.en.yml +1 -0
  73. data/config/routes.rb +11 -4
  74. data/lib/generators/sufia/sufia_generator.rb +2 -1
  75. data/lib/generators/sufia/templates/catalog_controller.rb +143 -117
  76. data/lib/generators/sufia/templates/config/resque_admin.rb +10 -0
  77. data/lib/generators/sufia/templates/config/sufia.rb +8 -0
  78. data/lib/sufia.rb +4 -14
  79. data/lib/sufia/batch_edits_controller_behavior.rb +89 -0
  80. data/lib/sufia/controller.rb +7 -5
  81. data/lib/sufia/downloads_controller_behavior.rb +14 -19
  82. data/lib/sufia/file_content/extract_metadata.rb +11 -4
  83. data/lib/sufia/files_controller_behavior.rb +63 -44
  84. data/lib/sufia/generic_file.rb +29 -11
  85. data/lib/sufia/generic_file/audit.rb +1 -1
  86. data/lib/sufia/generic_file/thumbnail.rb +51 -26
  87. data/lib/sufia/id_service.rb +28 -11
  88. data/lib/sufia/jobs/batch_update_job.rb +2 -2
  89. data/lib/sufia/jobs/characterize_job.rb +11 -3
  90. data/lib/sufia/jobs/ffmpeg_transcode_job.rb +61 -0
  91. data/lib/sufia/jobs/resolrize_job.rb +1 -1
  92. data/lib/sufia/jobs/transcode_audio_job.rb +40 -0
  93. data/lib/sufia/jobs/transcode_video_job.rb +9 -49
  94. data/lib/sufia/queue/resque.rb +2 -2
  95. data/lib/sufia/single_use_error.rb +4 -0
  96. data/lib/sufia/solr_document_behavior.rb +108 -1
  97. data/lib/sufia/version.rb +1 -1
  98. data/solr_conf/conf/schema.xml +332 -652
  99. data/solr_conf/conf/solrconfig.xml +60 -196
  100. data/spec/controllers/batch_controller_spec.rb +4 -5
  101. data/spec/controllers/catalog_controller_spec.rb +13 -13
  102. data/spec/controllers/dashboard_controller_spec.rb +2 -2
  103. data/spec/controllers/downloads_controller_spec.rb +74 -62
  104. data/spec/controllers/generic_files_controller_spec.rb +10 -8
  105. data/spec/controllers/single_use_link_controller_spec.rb +12 -4
  106. data/spec/fixtures/Example.ogg +0 -0
  107. data/spec/fixtures/piano_note.wav +0 -0
  108. data/spec/fixtures/sufia_generic_stub.descMeta.txt +1 -1
  109. data/spec/helpers/sufia_helper_spec.rb +12 -0
  110. data/spec/models/characterize_job_spec.rb +89 -0
  111. data/spec/models/checksum_audit_log_spec.rb +1 -0
  112. data/spec/models/event_jobs_spec.rb +9 -9
  113. data/spec/models/file_content_datastream_spec.rb +16 -10
  114. data/spec/models/fits_datastream_spec.rb +2 -8
  115. data/spec/models/generic_file_spec.rb +131 -60
  116. data/spec/models/solr_document_spec.rb +21 -0
  117. data/spec/models/transcode_audio_job_spec.rb +81 -0
  118. data/spec/models/transcode_video_job_spec.rb +2 -2
  119. data/spec/models/unzip_job_spec.rb +3 -3
  120. data/spec/spec_helper.rb +21 -0
  121. data/spec/support/Gemfile +7 -3
  122. data/sufia.gemspec +8 -11
  123. data/tasks/cucumber.rake +1 -2
  124. data/tasks/sufia-dev.rake +13 -2
  125. data/tasks/sufia.rake +1 -1
  126. metadata +77 -118
  127. data/app/views/batch_edits/_metadata.html.erb +0 -180
  128. data/lib/generators/sufia/templates/config/hydra_config.rb +0 -32
  129. data/lib/kaminari/helpers/tag.rb +0 -11
@@ -14,7 +14,7 @@ module Sufia
14
14
  def push(job)
15
15
  queue = job.respond_to?(:queue_name) ? job.queue_name : default_queue_name
16
16
  begin
17
- ::Resque.enqueue_to queue, MarshaledJob, Marshal.dump(job)
17
+ ::Resque.enqueue_to queue, MarshaledJob, Base64.encode64(Marshal.dump(job))
18
18
  rescue Redis::CannotConnectError
19
19
  logger.error "Redis is down!"
20
20
  end
@@ -23,7 +23,7 @@ module Sufia
23
23
 
24
24
  class MarshaledJob
25
25
  def self.perform(marshaled_job)
26
- Marshal.load(marshaled_job).run
26
+ Marshal.load(Base64.decode64(marshaled_job)).run
27
27
  end
28
28
  end
29
29
  end
@@ -0,0 +1,4 @@
1
+ module Sufia
2
+ class SingleUseError < StandardError; end
3
+ end
4
+
@@ -16,7 +16,114 @@
16
16
  module Sufia
17
17
  module SolrDocumentBehavior
18
18
  def title_or_label
19
- self['desc_metadata__title_display'] ? 'desc_metadata__title_display' : 'label_t'
19
+ title || label
20
+ end
21
+
22
+
23
+ ##
24
+ # Give our SolrDocument an ActiveModel::Naming appropriate route_key
25
+ def route_key
26
+ get('has_model_ssim').split(':').last.downcase
27
+ end
28
+
29
+
30
+ ##
31
+ # Offer the source (ActiveFedora-based) model to Rails for some of the
32
+ # Rails methods (e.g. link_to).
33
+ # @example
34
+ # link_to '...', SolrDocument(:id => 'bXXXXXX5').new => <a href="/dams_object/bXXXXXX5">...</a>
35
+ def to_model
36
+ m = ActiveFedora::Base.load_instance_from_solr(id, self)
37
+ return self if m.class == ActiveFedora::Base
38
+ m
39
+ end
40
+
41
+ def noid
42
+ self[Solrizer.solr_name('noid', Sufia::GenericFile.noid_indexer)]
43
+ end
44
+
45
+
46
+ def date_uploaded
47
+ field = self[Solrizer.solr_name("desc_metadata__date_uploaded", :stored_sortable, type: :date)]
48
+ return unless field.present?
49
+ begin
50
+ Date.parse(field).to_formatted_s(:standard)
51
+ rescue
52
+ logger.info "Unable to parse date: #{field.first.inspect} for #{self['id']}"
53
+ end
54
+ end
55
+
56
+
57
+ def depositor(default = '')
58
+ val = Array(self[Solrizer.solr_name("depositor")]).first
59
+ val.present? ? val : default
60
+ end
61
+
62
+ def title
63
+ Array(self[Solrizer.solr_name('desc_metadata__title')]).first
64
+ end
65
+
66
+ def description
67
+ Array(self[Solrizer.solr_name('desc_metadata__description')]).first
68
+ end
69
+
70
+ def label
71
+ Array(self[Solrizer.solr_name('label')]).first
72
+ end
73
+
74
+ def file_format
75
+ Array(self[Solrizer.solr_name('file_format')]).first
76
+ end
77
+
78
+ def creator
79
+ Array(self[Solrizer.solr_name("desc_metadata__creator")]).first
80
+ end
81
+
82
+ def tags
83
+ Array(self[Solrizer.solr_name("desc_metadata__tag")])
84
+ end
85
+
86
+ def mime_type
87
+ Array(self[Solrizer.solr_name("mime_type")]).first
88
+ end
89
+
90
+ def read_groups
91
+ Array(self[Ability.read_group_field])
92
+ end
93
+
94
+ def edit_groups
95
+ Array(self[Ability.edit_group_field])
96
+ end
97
+
98
+ def edit_people
99
+ Array(self[Ability.edit_person_field])
100
+ end
101
+
102
+ def public?
103
+ read_groups.include?('public')
104
+ end
105
+
106
+ def registered?
107
+ read_groups.include?('registered')
108
+ end
109
+
110
+
111
+ def pdf?
112
+ ['application/pdf'].include? self.mime_type
113
+ end
114
+
115
+ def image?
116
+ ['image/png','image/jpeg', 'image/jpg', 'image/jp2', 'image/bmp', 'image/gif'].include? self.mime_type
117
+ end
118
+
119
+ def video?
120
+ ['video/mpeg', 'video/mp4', 'video/webm', 'video/x-msvideo', 'video/avi', 'video/quicktime', 'application/mxf'].include? self.mime_type
121
+ end
122
+
123
+ def audio?
124
+ # audio/x-wave is the mime type that fits 0.6.0 returns for a wav file.
125
+ # audio/mpeg is the mime type that fits 0.6.0 returns for an mp3 file.
126
+ ['audio/mp3', 'audio/mpeg', 'audio/x-wave', 'audio/x-wav', 'audio/ogg'].include? self.mime_type
20
127
  end
21
128
  end
22
129
  end
@@ -1,3 +1,3 @@
1
1
  module Sufia
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -1,692 +1,372 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!--
3
- Licensed to the Apache Software Foundation (ASF) under one or more
4
- contributor license agreements. See the NOTICE file distributed with
5
- this work for additional information regarding copyright ownership.
6
- The ASF licenses this file to You under the Apache License, Version 2.0
7
- (the "License"); you may not use this file except in compliance with
8
- the License. You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- -->
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
+ <!--these fields are hard coded in places in hydra-head -->
17
+ <field name="active_fedora_model_s" type="string" stored="true" indexed="true"/>
18
+ <field name="object_profile_display" type="string" stored="true" indexed="true"/>
19
+ <field name="has_model_s" type="string" stored="true" indexed="true"/>
20
+ <field name="is_governed_by_s" type="string" stored="true" indexed="true"/>
21
+
22
+
23
+ <!--
24
+ These are hard coded in places in hydra-head, but we hope to fix that.
25
+
26
+ <field name="inheritable_discover_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
27
+ <field name="inheritable_read_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
28
+ <field name="inheritable_edit_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
29
+ <field name="inheritable_discover_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
30
+ <field name="inheritable_read_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
31
+ <field name="inheritable_edit_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
32
+ <field name="read_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
33
+ <field name="discover_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
34
+ <field name="edit_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
35
+ <field name="read_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
36
+ <field name="edit_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
37
+ <field name="discover_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
38
+ -->
39
+
40
+
41
+ <!-- NOTE: not all possible Solr field types are represented in the dynamic fields -->
42
+
43
+ <!-- text (_t...) -->
44
+ <dynamicField name="*_ti" type="text" stored="false" indexed="true" multiValued="false"/>
45
+ <dynamicField name="*_tim" type="text" stored="false" indexed="true" multiValued="true"/>
46
+ <dynamicField name="*_ts" type="text" stored="true" indexed="false" multiValued="false"/>
47
+ <dynamicField name="*_tsm" type="text" stored="true" indexed="false" multiValued="true"/>
48
+ <dynamicField name="*_tsi" type="text" stored="true" indexed="true" multiValued="false"/>
49
+ <dynamicField name="*_tsim" type="text" stored="true" indexed="true" multiValued="true"/>
50
+ <dynamicField name="*_tiv" type="text" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
51
+ <dynamicField name="*_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
52
+ <dynamicField name="*_tsiv" type="text" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
53
+ <dynamicField name="*_tsimv" type="text" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
54
+
55
+ <!-- English text (_te...) -->
56
+ <dynamicField name="*_tei" type="text_en" stored="false" indexed="true" multiValued="false"/>
57
+ <dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true"/>
58
+ <dynamicField name="*_tes" type="text_en" stored="true" indexed="false" multiValued="false"/>
59
+ <dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true"/>
60
+ <dynamicField name="*_tesi" type="text_en" stored="true" indexed="true" multiValued="false"/>
61
+ <dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true"/>
62
+ <dynamicField name="*_teiv" type="text_en" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
63
+ <dynamicField name="*_teimv" type="text_en" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
64
+ <dynamicField name="*_tesiv" type="text_en" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
65
+ <dynamicField name="*_tesimv" type="text_en" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
66
+
67
+ <!-- string (_s...) -->
68
+ <dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false"/>
69
+ <dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true"/>
70
+ <dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
71
+ <dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
72
+ <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
73
+ <dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
74
+ <dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
75
+
76
+ <!-- integer (_i...) -->
77
+ <dynamicField name="*_ii" type="int" stored="false" indexed="true" multiValued="false"/>
78
+ <dynamicField name="*_iim" type="int" stored="false" indexed="true" multiValued="true"/>
79
+ <dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
80
+ <dynamicField name="*_ism" type="int" stored="true" indexed="false" multiValued="true"/>
81
+ <dynamicField name="*_isi" type="int" stored="true" indexed="true" multiValued="false"/>
82
+ <dynamicField name="*_isim" type="int" stored="true" indexed="true" multiValued="true"/>
83
+
84
+ <!-- trie integer (_it...) (for faster range queries) -->
85
+ <dynamicField name="*_iti" type="tint" stored="false" indexed="true" multiValued="false"/>
86
+ <dynamicField name="*_itim" type="tint" stored="false" indexed="true" multiValued="true"/>
87
+ <dynamicField name="*_its" type="tint" stored="true" indexed="false" multiValued="false"/>
88
+ <dynamicField name="*_itsm" type="tint" stored="true" indexed="false" multiValued="true"/>
89
+ <dynamicField name="*_itsi" type="tint" stored="true" indexed="true" multiValued="false"/>
90
+ <dynamicField name="*_itsim" type="tint" stored="true" indexed="true" multiValued="true"/>
91
+
92
+ <!-- date (_dt...) -->
93
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
94
+ Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z -->
95
+ <dynamicField name="*_dti" type="date" stored="false" indexed="true" multiValued="false"/>
96
+ <dynamicField name="*_dtim" type="date" stored="false" indexed="true" multiValued="true"/>
97
+ <dynamicField name="*_dts" type="date" stored="true" indexed="false" multiValued="false"/>
98
+ <dynamicField name="*_dtsm" type="date" stored="true" indexed="false" multiValued="true"/>
99
+ <dynamicField name="*_dtsi" type="date" stored="true" indexed="true" multiValued="false"/>
100
+ <dynamicField name="*_dtsim" type="date" stored="true" indexed="true" multiValued="true"/>
101
+
102
+ <!-- trie date (_dtt...) (for faster range queries) -->
103
+ <dynamicField name="*_dtti" type="tdate" stored="false" indexed="true" multiValued="false"/>
104
+ <dynamicField name="*_dttim" type="tdate" stored="false" indexed="true" multiValued="true"/>
105
+ <dynamicField name="*_dtts" type="tdate" stored="true" indexed="false" multiValued="false"/>
106
+ <dynamicField name="*_dttsm" type="tdate" stored="true" indexed="false" multiValued="true"/>
107
+ <dynamicField name="*_dttsi" type="tdate" stored="true" indexed="true" multiValued="false"/>
108
+ <dynamicField name="*_dttsim" type="tdate" stored="true" indexed="true" multiValued="true"/>
109
+
110
+ <!-- long (_l...) -->
111
+ <dynamicField name="*_li" type="long" stored="false" indexed="true" multiValued="false"/>
112
+ <dynamicField name="*_lim" type="long" stored="false" indexed="true" multiValued="true"/>
113
+ <dynamicField name="*_ls" type="long" stored="true" indexed="false" multiValued="false"/>
114
+ <dynamicField name="*_lsm" type="long" stored="true" indexed="false" multiValued="true"/>
115
+ <dynamicField name="*_lsi" type="long" stored="true" indexed="true" multiValued="false"/>
116
+ <dynamicField name="*_lsim" type="long" stored="true" indexed="true" multiValued="true"/>
117
+
118
+ <!-- trie long (_lt...) (for faster range queries) -->
119
+ <dynamicField name="*_lti" type="tlong" stored="false" indexed="true" multiValued="false"/>
120
+ <dynamicField name="*_ltim" type="tlong" stored="false" indexed="true" multiValued="true"/>
121
+ <dynamicField name="*_lts" type="tlong" stored="true" indexed="false" multiValued="false"/>
122
+ <dynamicField name="*_ltsm" type="tlong" stored="true" indexed="false" multiValued="true"/>
123
+ <dynamicField name="*_ltsi" type="tlong" stored="true" indexed="true" multiValued="false"/>
124
+ <dynamicField name="*_ltsim" type="tlong" stored="true" indexed="true" multiValued="true"/>
125
+
126
+ <!-- double (_db...) -->
127
+ <dynamicField name="*_dbi" type="double" stored="false" indexed="true" multiValued="false"/>
128
+ <dynamicField name="*_dbim" type="double" stored="false" indexed="true" multiValued="true"/>
129
+ <dynamicField name="*_dbs" type="double" stored="true" indexed="false" multiValued="false"/>
130
+ <dynamicField name="*_dbsm" type="double" stored="true" indexed="false" multiValued="true"/>
131
+ <dynamicField name="*_dbsi" type="double" stored="true" indexed="true" multiValued="false"/>
132
+ <dynamicField name="*_dbsim" type="double" stored="true" indexed="true" multiValued="true"/>
133
+
134
+ <!-- trie double (_dbt...) (for faster range queries) -->
135
+ <dynamicField name="*_dbti" type="tdouble" stored="false" indexed="true" multiValued="false"/>
136
+ <dynamicField name="*_dbtim" type="tdouble" stored="false" indexed="true" multiValued="true"/>
137
+ <dynamicField name="*_dbts" type="tdouble" stored="true" indexed="false" multiValued="false"/>
138
+ <dynamicField name="*_dbtsm" type="tdouble" stored="true" indexed="false" multiValued="true"/>
139
+ <dynamicField name="*_dbtsi" type="tdouble" stored="true" indexed="true" multiValued="false"/>
140
+ <dynamicField name="*_dbtsim" type="tdouble" stored="true" indexed="true" multiValued="true"/>
141
+
142
+ <!-- float (_f...) -->
143
+ <dynamicField name="*_fi" type="float" stored="false" indexed="true" multiValued="false"/>
144
+ <dynamicField name="*_fim" type="float" stored="false" indexed="true" multiValued="true"/>
145
+ <dynamicField name="*_fs" type="float" stored="true" indexed="false" multiValued="false"/>
146
+ <dynamicField name="*_fsm" type="float" stored="true" indexed="false" multiValued="true"/>
147
+ <dynamicField name="*_fsi" type="float" stored="true" indexed="true" multiValued="false"/>
148
+ <dynamicField name="*_fsim" type="float" stored="true" indexed="true" multiValued="true"/>
149
+
150
+ <!-- trie float (_ft...) (for faster range queries) -->
151
+ <dynamicField name="*_fti" type="tfloat" stored="false" indexed="true" multiValued="false"/>
152
+ <dynamicField name="*_ftim" type="tfloat" stored="false" indexed="true" multiValued="true"/>
153
+ <dynamicField name="*_fts" type="tfloat" stored="true" indexed="false" multiValued="false"/>
154
+ <dynamicField name="*_ftsm" type="tfloat" stored="true" indexed="false" multiValued="true"/>
155
+ <dynamicField name="*_ftsi" type="tfloat" stored="true" indexed="true" multiValued="false"/>
156
+ <dynamicField name="*_ftsim" type="tfloat" stored="true" indexed="true" multiValued="true"/>
157
+
158
+ <!-- boolean (_b...) -->
159
+ <dynamicField name="*_bi" type="boolean" stored="false" indexed="true" multiValued="false"/>
160
+ <dynamicField name="*_bs" type="boolean" stored="true" indexed="false" multiValued="false"/>
161
+ <dynamicField name="*_bsi" type="boolean" stored="true" indexed="true" multiValued="false"/>
162
+
163
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
164
+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
18
165
 
19
- <!--
20
- This is the Solr schema file. This file should be named "schema.xml" and
21
- should be in the conf directory under the solr home
22
- (i.e. ./solr/conf/schema.xml by default)
23
- or located where the classloader for the Solr webapp can find it.
166
+ <!-- location (_ll...) -->
167
+ <dynamicField name="*_lli" type="location" stored="false" indexed="true" multiValued="false"/>
168
+ <dynamicField name="*_llim" type="location" stored="false" indexed="true" multiValued="true"/>
169
+ <dynamicField name="*_lls" type="location" stored="true" indexed="false" multiValued="false"/>
170
+ <dynamicField name="*_llsm" type="location" stored="true" indexed="false" multiValued="true"/>
171
+ <dynamicField name="*_llsi" type="location" stored="true" indexed="true" multiValued="false"/>
172
+ <dynamicField name="*_llsim" type="location" stored="true" indexed="true" multiValued="true"/>
24
173
 
25
- This example schema is the recommended starting point for users.
26
- It should be kept correct and concise, usable out-of-the-box.
174
+ <!-- you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
175
+ <field name="all_text_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
27
176
 
28
- For more information, on how to customize this file, please see
29
- http://wiki.apache.org/solr/SchemaXml
177
+ </fields>
30
178
 
31
- PERFORMANCE NOTE: this schema includes many optional features and should not
32
- be used for benchmarking. To improve performance one could
33
- - set stored="false" for all fields possible (esp large fields) when you
34
- only need to search on the field but don't need to return the original
35
- value.
36
- - set indexed="false" if you don't need to search on the field, but only
37
- return the field as a result of searching on other indexed fields.
38
- - remove all unneeded copyField statements
39
- - for best index size and searching performance, set "index" to false
40
- for all general text fields, use copyField to copy them to the
41
- catchall "text" field, and use that for searching.
42
- - For maximum indexing performance, use the StreamingUpdateSolrServer
43
- java client.
44
- - Remember to run the JVM in server mode, and use a higher logging level
45
- that avoids logging every request
179
+ <!-- START hydra deprecated items -->
180
+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
181
+ <!--
182
+ <solrQueryParser defaultOperator="AND"/>
183
+
184
+ <copyField source="title_t" dest="title_unstem_search"/>
185
+ <copyField source="subtitle_t" dest="subtitle_unstem_search"/>
186
+ <copyField source="title_addl_t" dest="title_addl_unstem_search"/>
187
+ <copyField source="title_added_entry_t" dest="title_added_entry_unstem_search"/>
188
+ <copyField source="title_series_t" dest="title_series_unstem_search"/>
189
+ <copyField source="author_t" dest="author_unstem_search"/>
190
+ <copyField source="author_addl_t" dest="author_addl_unstem_search"/>
191
+ <copyField source="subject_t" dest="subject_unstem_search"/>
192
+ <copyField source="subject_addl_t" dest="subject_addl_unstem_search"/>
193
+ <copyField source="subject_topic_facet" dest="subject_topic_unstem_search"/>
194
+ -->
195
+ <!-- sort fields -->
196
+ <!--
197
+ <copyField source="pub_date" dest="pub_date_sort"/>
46
198
  -->
47
199
 
48
- <schema name="Hydra" version="1.4">
49
- <!-- attribute "name" is the name of this schema and is only used for display purposes.
50
- Applications should change this to reflect the nature of the search collection.
51
- version="1.4" is Solr's version number for the schema syntax and semantics. It should
52
- not normally be changed by applications.
53
- 1.0: multiValued attribute did not exist, all fields are multiValued by nature
54
- 1.1: multiValued attribute introduced, false by default
55
- 1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
56
- 1.3: removed optional field compress feature
57
- 1.4: default auto-phrase (QueryParser feature) to off
58
- -->
59
-
60
- <types>
61
- <!-- field type definitions. The "name" attribute is
62
- just a label to be used by field definitions. The "class"
63
- attribute and any other attributes determine the real
64
- behavior of the fieldType.
65
- Class names starting with "solr" refer to java classes in the
66
- org.apache.solr.analysis package.
67
- -->
68
-
69
- <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
70
- <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
71
-
72
- <!-- boolean type: "true" or "false" -->
73
- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
74
- <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
75
- <fieldtype name="binary" class="solr.BinaryField"/>
200
+ <!-- spellcheck fields -->
201
+ <!-- default spell check; should match fields for default request handler -->
202
+ <!-- it won't work with a copy of a copy field -->
203
+ <!--
204
+ <copyField source="*_t" dest="spell"/>
205
+ <copyField source="*_facet" dest="spell"/>
206
+ -->
207
+ <!-- title spell check; should match fields for title request handler -->
208
+ <!--
209
+ <copyField source="title_t" dest="title_spell"/>
210
+ <copyField source="subtitle_t" dest="title_spell"/>
211
+ <copyField source="addl_titles_t" dest="title_spell"/>
212
+ <copyField source="title_added_entry_t" dest="title_spell"/>
213
+ <copyField source="title_series_t" dest="title_spell"/>
214
+ -->
215
+ <!-- author spell check; should match fields for author request handler -->
216
+ <!--
217
+ <copyField source="author_t" dest="author_spell"/>
218
+ <copyField source="author_addl_t" dest="author_spell"/>
219
+ -->
220
+ <!-- subject spell check; should match fields for subject request handler -->
221
+ <!--
222
+ <copyField source="subject_topic_facet" dest="subject_spell"/>
223
+ <copyField source="subject_t" dest="subject_spell"/>
224
+ <copyField source="subject_addl_t" dest="subject_spell"/>
225
+ -->
226
+
227
+ <!-- OpenSearch query field should match request handler search fields -->
228
+ <!--
229
+ <copyField source="title_t" dest="opensearch_display"/>
230
+ <copyField source="subtitle_t" dest="opensearch_display"/>
231
+ <copyField source="addl_titles_t" dest="opensearch_display"/>
232
+ <copyField source="title_added_entry_t" dest="opensearch_display"/>
233
+ <copyField source="title_series_t" dest="opensearch_display"/>
234
+ <copyField source="author_t" dest="opensearch_display"/>
235
+ <copyField source="author_addl_t" dest="opensearch_display"/>
236
+ <copyField source="subject_topic_facet" dest="opensearch_display"/>
237
+ <copyField source="subject_t" dest="opensearch_display"/>
238
+ <copyField source="subject_addl_t" dest="opensearch_display"/>
239
+ -->
76
240
 
77
- <!-- The optional sortMissingLast and sortMissingFirst attributes are
78
- currently supported on types that are sorted internally as strings
79
- and on numeric types.
80
- This includes "string","boolean", and, as of 3.5 (and 4.x),
81
- int, float, long, date, double, including the "Trie" variants.
82
- - If sortMissingLast="true", then a sort on this field will cause documents
83
- without the field to come after documents with the field,
84
- regardless of the requested sort order (asc or desc).
85
- - If sortMissingFirst="true", then a sort on this field will cause documents
86
- without the field to come before documents with the field,
87
- regardless of the requested sort order.
88
- - If sortMissingLast="false" and sortMissingFirst="false" (the default),
89
- then default lucene sorting will be used which places docs without the
90
- field first in an ascending sort and last in a descending sort.
91
- -->
241
+ <!-- Above, multiple source fields are copied to the [text] field.
242
+ Another way to map multiple source fields to the same
243
+ destination field is to use the dynamic field syntax.
244
+ copyField also supports a maxChars to copy setting. -->
92
245
 
93
- <!--
94
- Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
95
- -->
96
- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
97
- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
98
- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
99
- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
246
+ <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
247
+ <!--
248
+ <copyField source="*_s" dest="text"/>
249
+ <copyField source="*_t" dest="text"/>
250
+ <copyField source="*_facet" dest="text"/>
251
+ -->
252
+ <!-- copy name to alphaNameSort, a field designed for sorting by name -->
253
+ <!-- <copyField source="name" dest="alphaNameSort"/> -->
100
254
 
101
- <!--
102
- Numeric field types that index each value at various levels of precision
103
- to accelerate range queries when the number of values between the range
104
- endpoints is large. See the javadoc for NumericRangeQuery for internal
105
- implementation details.
255
+ <!-- END hydra deprecated items -->
106
256
 
107
- Smaller precisionStep values (specified in bits) will lead to more tokens
108
- indexed per value, slightly larger index size, and faster range queries.
109
- A precisionStep of 0 disables indexing at different precision levels.
110
- -->
111
- <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
112
- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
113
- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
114
- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
257
+ <!-- copy fields; note that you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
258
+ <!--
259
+ <copyField source="some_field" dest="all_text_timv" />
260
+ -->
115
261
 
116
- <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
117
- is a more restricted form of the canonical representation of dateTime
118
- http://www.w3.org/TR/xmlschema-2/#dateTime
119
- The trailing "Z" designates UTC time and is mandatory.
262
+ <types>
263
+ <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
264
+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
265
+ <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
266
+
267
+ <!-- Default numeric field types. -->
268
+ <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
269
+ <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
270
+ <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
271
+ <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
272
+
273
+ <!-- trie numeric field types for faster range queries -->
274
+ <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
275
+ <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
276
+ <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
277
+ <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
278
+
279
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
120
280
  Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
121
- All other components are mandatory.
122
-
123
- Expressions can also be used to denote calculations that should be
124
- performed relative to "NOW" to determine the value, ie...
125
-
126
- NOW/HOUR
127
- ... Round to the start of the current hour
128
- NOW-1DAY
129
- ... Exactly 1 day prior to now
130
- NOW/DAY+6MONTHS+3DAYS
131
- ... 6 months and 3 days in the future from the start of
132
- the current day
133
-
134
- Consult the DateField javadocs for more information.
135
-
136
- Note: For faster range queries, consider the tdate type
137
281
  -->
138
- <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
139
-
282
+ <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
140
283
  <!-- A Trie based date field for faster date range queries and date faceting. -->
141
- <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
142
-
143
-
144
- <!--
145
- Note:
146
- These should only be used for compatibility with existing indexes (created with older Solr versions)
147
- or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
148
-
149
- Plain numeric field types that store and index the text
150
- value verbatim (and hence don't support range queries, since the
151
- lexicographic ordering isn't equal to the numeric ordering)
152
- -->
153
- <fieldType name="pint" class="solr.IntField" omitNorms="true"/>
154
- <fieldType name="plong" class="solr.LongField" omitNorms="true"/>
155
- <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
156
- <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
157
- <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
158
-
159
-
160
- <!--
161
- Note:
162
- These should only be used for compatibility with existing indexes (created with older Solr versions).
163
- Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last
164
-
165
- Numeric field types that manipulate the value into
166
- a string value that isn't human-readable in its internal form,
167
- but with a lexicographic ordering the same as the numeric ordering,
168
- so that range queries work correctly.
169
- -->
170
- <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
171
- <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
172
- <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
173
- <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
174
-
175
-
176
- <!-- The "RandomSortField" is not used to store or search any
177
- data. You can declare fields of this type it in your schema
178
- to generate pseudo-random orderings of your docs for sorting
179
- purposes. The ordering is generated based on the field name
180
- and the version of the index, As long as the index version
181
- remains unchanged, and the same field name is reused,
182
- the ordering of the docs will be consistent.
183
- If you want different psuedo-random orderings of documents,
184
- for the same version of the index, use a dynamicField and
185
- change the name
186
- -->
187
- <fieldType name="random" class="solr.RandomSortField" indexed="true" />
188
-
189
- <!-- solr.TextField allows the specification of custom text analyzers
190
- specified as a tokenizer and a list of token filters. Different
191
- analyzers may be specified for indexing and querying.
192
-
193
- The optional positionIncrementGap puts space between multiple fields of
194
- this type on the same document, with the purpose of preventing false phrase
195
- matching across fields.
196
-
197
- For more info on customizing your analyzer chain, please see
198
- http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
284
+ <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
285
+
286
+
287
+ <!-- This point type indexes the coordinates as separate fields (subFields)
288
+ If subFieldType is defined, it references a type, and a dynamic field
289
+ definition is created matching *___<typename>. Alternately, if
290
+ subFieldSuffix is defined, that is used to create the subFields.
291
+ Example: if subFieldType="double", then the coordinates would be
292
+ indexed in fields myloc_0___double,myloc_1___double.
293
+ Example: if subFieldSuffix="_d" then the coordinates would be indexed
294
+ in fields myloc_0_d,myloc_1_d
295
+ The subFields are an implementation detail of the fieldType, and end
296
+ users normally should not need to know about them.
199
297
  -->
200
- <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
201
- <analyzer>
202
- <tokenizer class="solr.StandardTokenizerFactory"/>
203
- <filter class="solr.ICUFoldingFilterFactory" />
204
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
205
- <filter class="solr.SnowballPorterFilterFactory" language="English" />
206
- </analyzer>
207
- </fieldType>
208
-
209
- <!-- One can also specify an existing Analyzer class that has a
210
- default constructor via the class attribute on the analyzer element
211
- <fieldType name="text_greek" class="solr.TextField">
212
- <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
213
- </fieldType>
298
+ <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
299
+
300
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
301
+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
302
+
303
+ <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
304
+ For more information about this and other Spatial fields new to Solr 4, see:
305
+ http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
214
306
  -->
215
-
307
+ <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
308
+ geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
309
+
310
+ <fieldType name="text" class="solr.TextField" omitNorms="false">
311
+ <analyzer>
312
+ <tokenizer class="solr.ICUTokenizerFactory"/>
313
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
314
+ <filter class="solr.TrimFilterFactory"/>
315
+ </analyzer>
316
+ </fieldType>
317
+
216
318
  <!-- A text field that only splits on whitespace for exact matching of words -->
217
319
  <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
218
320
  <analyzer>
219
321
  <tokenizer class="solr.WhitespaceTokenizerFactory"/>
322
+ <filter class="solr.TrimFilterFactory"/>
220
323
  </analyzer>
221
324
  </fieldType>
222
-
223
- <!-- A general text field that has reasonable, generic
224
- cross-language defaults: it tokenizes with StandardTokenizer,
225
- removes stop words from case-insensitive "stopwords.txt"
226
- (empty by default), and down cases. At query time only, it
227
- also applies synonyms. -->
228
- <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
229
- <analyzer type="index">
230
- <tokenizer class="solr.StandardTokenizerFactory"/>
231
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
232
- <!-- in this example, we will only use synonyms at query time
233
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
234
- -->
235
- <filter class="solr.LowerCaseFilterFactory"/>
236
- </analyzer>
237
- <analyzer type="query">
238
- <tokenizer class="solr.StandardTokenizerFactory"/>
239
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
240
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
241
- <filter class="solr.LowerCaseFilterFactory"/>
325
+
326
+ <!-- single token analyzed text, for sorting. Punctuation is significant. -->
327
+ <fieldtype name="alphaSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
328
+ <analyzer>
329
+ <tokenizer class="solr.KeywordTokenizerFactory" />
330
+ <filter class="solr.ICUFoldingFilterFactory"/>
331
+ <filter class="solr.TrimFilterFactory" />
242
332
  </analyzer>
243
- </fieldType>
244
-
245
- <!-- A text field with defaults appropriate for English: it
246
- tokenizes with StandardTokenizer, removes English stop words
247
- (stopwords_en.txt), down cases, protects words from protwords.txt, and
248
- finally applies Porter's stemming. The query time analyzer
249
- also applies synonyms from synonyms.txt. -->
333
+ </fieldtype>
334
+
335
+ <!-- A text field with defaults appropriate for English -->
250
336
  <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
251
- <analyzer type="index">
252
- <tokenizer class="solr.StandardTokenizerFactory"/>
253
- <!-- in this example, we will only use synonyms at query time
254
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
255
- -->
256
- <!-- Case insensitive stop word removal.
257
- add enablePositionIncrements=true in both the index and query
258
- analyzers to leave a 'gap' for more accurate phrase queries.
259
- -->
260
- <filter class="solr.StopFilterFactory"
261
- ignoreCase="true"
262
- words="stopwords_en.txt"
263
- enablePositionIncrements="true"
264
- />
265
- <filter class="solr.LowerCaseFilterFactory"/>
266
- <filter class="solr.EnglishPossessiveFilterFactory"/>
267
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
268
- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
269
- <filter class="solr.EnglishMinimalStemFilterFactory"/>
270
- -->
271
- <filter class="solr.PorterStemFilterFactory"/>
272
- </analyzer>
273
- <analyzer type="query">
274
- <tokenizer class="solr.StandardTokenizerFactory"/>
275
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
276
- <filter class="solr.StopFilterFactory"
277
- ignoreCase="true"
278
- words="stopwords_en.txt"
279
- enablePositionIncrements="true"
280
- />
281
- <filter class="solr.LowerCaseFilterFactory"/>
282
- <filter class="solr.EnglishPossessiveFilterFactory"/>
283
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
284
- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
337
+ <analyzer>
338
+ <tokenizer class="solr.ICUTokenizerFactory"/>
339
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
340
+ <filter class="solr.EnglishPossessiveFilterFactory"/>
341
+ <!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
285
342
  <filter class="solr.EnglishMinimalStemFilterFactory"/>
286
- -->
343
+ <!--
287
344
  <filter class="solr.PorterStemFilterFactory"/>
345
+ -->
346
+ <filter class="solr.TrimFilterFactory"/>
288
347
  </analyzer>
289
348
  </fieldType>
290
-
291
- <!-- A text field with defaults appropriate for English, plus
292
- aggressive word-splitting and autophrase features enabled.
293
- This field is just like text_en, except it adds
294
- WordDelimiterFilter to enable splitting and matching of
295
- words on case-change, alpha numeric boundaries, and
296
- non-alphanumeric chars. This means certain compound word
297
- cases will work, for example query "wi fi" will match
298
- document "WiFi" or "wi-fi". However, other cases will still
299
- not match, for example if the query is "wifi" and the
300
- document is "wi fi" or if the query is "wi-fi" and the
301
- document is "wifi".
302
- -->
303
- <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
349
+
350
+ <!-- queries for paths match documents at that path, or in descendent paths -->
351
+ <fieldType name="descendent_path" class="solr.TextField">
304
352
  <analyzer type="index">
305
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
306
- <!-- in this example, we will only use synonyms at query time
307
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
308
- -->
309
- <!-- Case insensitive stop word removal.
310
- add enablePositionIncrements=true in both the index and query
311
- analyzers to leave a 'gap' for more accurate phrase queries.
312
- -->
313
- <filter class="solr.StopFilterFactory"
314
- ignoreCase="true"
315
- words="stopwords_en.txt"
316
- enablePositionIncrements="true"
317
- />
318
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
319
- <filter class="solr.LowerCaseFilterFactory"/>
320
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
321
- <filter class="solr.PorterStemFilterFactory"/>
353
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
322
354
  </analyzer>
323
355
  <analyzer type="query">
324
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
325
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
326
- <filter class="solr.StopFilterFactory"
327
- ignoreCase="true"
328
- words="stopwords_en.txt"
329
- enablePositionIncrements="true"
330
- />
331
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
332
- <filter class="solr.LowerCaseFilterFactory"/>
333
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
334
- <filter class="solr.PorterStemFilterFactory"/>
335
- </analyzer>
336
- </fieldType>
337
-
338
- <!-- Less flexible matching, but less false matches. Probably not ideal for product names,
339
- but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
340
- <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
341
- <analyzer>
342
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
343
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
344
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
345
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
346
- <filter class="solr.LowerCaseFilterFactory"/>
347
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
348
- <filter class="solr.EnglishMinimalStemFilterFactory"/>
349
- <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
350
- possible with WordDelimiterFilter in conjuncton with stemming. -->
351
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
356
+ <tokenizer class="solr.KeywordTokenizerFactory" />
352
357
  </analyzer>
353
358
  </fieldType>
354
-
355
- <!-- Just like text_general except it reverses the characters of
356
- each token, to enable more efficient leading wildcard queries. -->
357
- <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
359
+
360
+ <!-- queries for paths match documents at that path, or in ancestor paths -->
361
+ <fieldType name="ancestor_path" class="solr.TextField">
358
362
  <analyzer type="index">
359
- <tokenizer class="solr.StandardTokenizerFactory"/>
360
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
361
- <filter class="solr.LowerCaseFilterFactory"/>
362
- <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
363
- maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
363
+ <tokenizer class="solr.KeywordTokenizerFactory" />
364
364
  </analyzer>
365
365
  <analyzer type="query">
366
- <tokenizer class="solr.StandardTokenizerFactory"/>
367
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
368
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
369
- <filter class="solr.LowerCaseFilterFactory"/>
370
- </analyzer>
371
- </fieldType>
372
-
373
- <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
374
- <analyzer>
375
- <tokenizer class="solr.StandardTokenizerFactory"/>
376
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
377
- <filter class="solr.StandardFilterFactory"/>
378
- <filter class="solr.LowerCaseFilterFactory"/>
379
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
380
- </analyzer>
381
- </fieldType>
382
-
383
- <!-- charFilter + WhitespaceTokenizer -->
384
- <!--
385
- <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
386
- <analyzer>
387
- <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
388
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
389
- </analyzer>
390
- </fieldType>
391
- -->
392
-
393
- <!-- This is an example of using the KeywordTokenizer along
394
- With various TokenFilterFactories to produce a sortable field
395
- that does not include some properties of the source text
396
- -->
397
- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
398
- <analyzer>
399
- <!-- KeywordTokenizer does no actual tokenizing, so the entire
400
- input string is preserved as a single token
401
- -->
402
- <tokenizer class="solr.KeywordTokenizerFactory"/>
403
- <!-- The LowerCase TokenFilter does what you expect, which can be
404
- when you want your sorting to be case insensitive
405
- -->
406
- <filter class="solr.LowerCaseFilterFactory" />
407
- <!-- The TrimFilter removes any leading or trailing whitespace -->
408
- <filter class="solr.TrimFilterFactory" />
409
- <!-- The PatternReplaceFilter gives you the flexibility to use
410
- Java Regular expression to replace any sequence of characters
411
- matching a pattern with an arbitrary replacement string,
412
- which may include back references to portions of the original
413
- string matched by the pattern.
414
-
415
- See the Java Regular Expression documentation for more
416
- information on pattern and replacement string syntax.
417
-
418
- http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
419
- -->
420
- <filter class="solr.PatternReplaceFilterFactory"
421
- pattern="([^a-z])" replacement="" replace="all"
422
- />
366
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
423
367
  </analyzer>
424
368
  </fieldType>
425
369
 
426
- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
427
- <analyzer>
428
- <tokenizer class="solr.StandardTokenizerFactory"/>
429
- <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
430
- </analyzer>
431
- </fieldtype>
432
-
433
- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
434
- <analyzer>
435
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
436
- <!--
437
- The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
438
- a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
439
- Attributes of the DelimitedPayloadTokenFilterFactory :
440
- "delimiter" - a one character delimiter. Default is | (pipe)
441
- "encoder" - how to encode the following value into a playload
442
- float -> org.apache.lucene.analysis.payloads.FloatEncoder,
443
- integer -> o.a.l.a.p.IntegerEncoder
444
- identity -> o.a.l.a.p.IdentityEncoder
445
- Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
446
- -->
447
- <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
448
- </analyzer>
449
- </fieldtype>
450
-
451
- <!-- lowercases the entire field value, keeping it as a single token. -->
452
- <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
453
- <analyzer>
454
- <tokenizer class="solr.KeywordTokenizerFactory"/>
455
- <filter class="solr.LowerCaseFilterFactory" />
456
- </analyzer>
457
- </fieldType>
458
-
459
- <fieldType name="text_path" class="solr.TextField" positionIncrementGap="100">
460
- <analyzer>
461
- <tokenizer class="solr.PathHierarchyTokenizerFactory"/>
462
- </analyzer>
463
- </fieldType>
464
-
465
- <!-- since fields of this type are by default not stored or indexed,
466
- any data added to them will be ignored outright. -->
467
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
468
-
469
- <!-- This point type indexes the coordinates as separate fields (subFields)
470
- If subFieldType is defined, it references a type, and a dynamic field
471
- definition is created matching *___<typename>. Alternately, if
472
- subFieldSuffix is defined, that is used to create the subFields.
473
- Example: if subFieldType="double", then the coordinates would be
474
- indexed in fields myloc_0___double,myloc_1___double.
475
- Example: if subFieldSuffix="_d" then the coordinates would be indexed
476
- in fields myloc_0_d,myloc_1_d
477
- The subFields are an implementation detail of the fieldType, and end
478
- users normally should not need to know about them.
479
- -->
480
- <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
481
-
482
- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
483
- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
484
-
485
- <!--
486
- A Geohash is a compact representation of a latitude longitude pair in a single field.
487
- See http://wiki.apache.org/solr/SpatialSearch
488
- -->
489
- <fieldtype name="geohash" class="solr.GeoHashField"/>
490
- </types>
491
-
492
-
493
- <fields>
494
- <!-- Valid attributes for fields:
495
- name: mandatory - the name for the field
496
- type: mandatory - the name of a previously defined type from the
497
- <types> section
498
- indexed: true if this field should be indexed (searchable or sortable)
499
- stored: true if this field should be retrievable
500
- multiValued: true if this field may contain multiple values per document
501
- omitNorms: (expert) set to true to omit the norms associated with
502
- this field (this disables length normalization and index-time
503
- boosting for the field, and saves some memory). Only full-text
504
- fields or fields that need an index-time boost need norms.
505
- termVectors: [false] set to true to store the term vector for a
506
- given field.
507
- When using MoreLikeThis, fields used for similarity should be
508
- stored for best performance.
509
- termPositions: Store position information with the term vector.
510
- This will increase storage costs.
511
- termOffsets: Store offset information with the term vector. This
512
- will increase storage costs.
513
- default: a value that should be used if no value is specified
514
- when adding a document.
515
- -->
516
-
517
- <!-- NOTE: this is not a full list of fields in the index; dynamic fields are also used -->
518
- <field name="id" type="string" indexed="true" stored="true" required="true" />
519
- <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
520
- <!-- default, catch all search field -->
521
- <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
522
-
523
- <!-- these display fields are NOT multi-valued -->
524
- <field name="marc_display" type="string" indexed="false" stored="true" multiValued="false"/>
525
- <field name="title_display" type="string" indexed="false" stored="true" multiValued="false"/>
526
- <field name="title_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
527
- <field name="subtitle_display" type="string" indexed="false" stored="true" multiValued="false"/>
528
- <field name="subtitle_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
529
- <field name="author_display" type="string" indexed="false" stored="true" multiValued="false"/>
530
- <field name="author_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
531
-
532
- <!-- these fields are also used for display, so they must be stored -->
533
- <field name="isbn_t" type="text" indexed="true" stored="true" multiValued="true"/>
534
- <field name="language_facet" type="string" indexed="true" stored="true" multiValued="true" />
535
- <field name="subject_topic_facet" type="string" indexed="true" stored="true" multiValued="true" />
536
- <field name="subject_era_facet" type="string" indexed="true" stored="true" multiValued="true" />
537
- <field name="subject_geo_facet" type="string" indexed="true" stored="true" multiValued="true" />
538
- <!-- pub_date is used for facet and display so it must be indexed and stored -->
539
- <field name="pub_date" type="string" indexed="true" stored="true" multiValued="true"/>
540
- <!-- pub_date sort uses new trie-based int fields, which are recommended for any int and are displayable, sortable, and range-quer
541
- we use 'tint' for faster range-queries. -->
542
- <field name="pub_date_sort" type="tint" indexed="true" stored="true" multiValued="false"/>
543
-
544
- <!-- format is used for facet, display, and choosing which partial to use for the show view, so it must be stored and indexed -->
545
- <field name="format" type="string" indexed="true" stored="true"/>
546
-
547
-
548
-
549
- <!-- Dynamic field definitions. If a field name is not found, dynamicFields
550
- will be used if the name matches any of the patterns.
551
- RESTRICTION: the glob-like pattern in the name attribute must have
552
- a "*" only at the start or the end.
553
- EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
554
- Longer patterns will be matched first. if equal size patterns
555
- both match, the first appearing in the schema will be used. -->
556
- <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
557
- <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
558
- <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
559
- <dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
560
- <dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
561
- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
562
- <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
563
- <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
564
-
565
- <!-- Type used to index the lat and lon components for the "location" FieldType -->
566
- <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
567
-
568
- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
569
- <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
570
-
571
- <!-- some trie-coded dynamic fields for faster range queries -->
572
- <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
573
- <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
574
- <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
575
- <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
576
- <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
577
-
578
- <dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
579
-
580
- <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
581
- <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
582
-
583
- <dynamicField name="random_*" type="random" />
584
-
585
- <dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
586
- <dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true" />
587
- <dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="false" />
588
- <dynamicField name="*_unstem_search" type="text_general" indexed="true" stored="false" multiValued="true" />
589
- <dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
590
-
591
- <!-- uncomment the following to ignore any fields that don't already match an existing
592
- field name or dynamic field, rather than reporting them as an error.
593
- alternately, change the type="ignored" to some other type e.g. "text" if you want
594
- unknown fields indexed and/or stored by default -->
595
- <!--dynamicField name="*" type="ignored" multiValued="true" /-->
596
-
597
- </fields>
598
-
599
- <!-- Field to use to determine and enforce document uniqueness.
600
- Unless this field is marked with required="false", it will be a required field
601
- -->
602
- <uniqueKey>id</uniqueKey>
603
-
604
- <!-- field for the QueryParser to use when an explicit fieldname is absent -->
605
- <defaultSearchField>text</defaultSearchField>
606
-
607
- <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
608
- <solrQueryParser defaultOperator="AND"/>
609
-
610
- <!-- copyField commands copy one field to another at the time a document
611
- is added to the index. It's used either to index the same field differently,
612
- or to add multiple fields to the same field for easier/faster searching. -->
613
- <!-- Copy Fields -->
614
-
615
- <!-- unstemmed fields -->
616
- <copyField source="title_t" dest="title_unstem_search"/>
617
- <copyField source="subtitle_t" dest="subtitle_unstem_search"/>
618
- <copyField source="title_addl_t" dest="title_addl_unstem_search"/>
619
- <copyField source="title_added_entry_t" dest="title_added_entry_unstem_search"/>
620
- <copyField source="title_series_t" dest="title_series_unstem_search"/>
621
- <copyField source="author_t" dest="author_unstem_search"/>
622
- <copyField source="author_addl_t" dest="author_addl_unstem_search"/>
623
- <copyField source="subject_t" dest="subject_unstem_search"/>
624
- <copyField source="subject_addl_t" dest="subject_addl_unstem_search"/>
625
- <copyField source="subject_topic_facet" dest="subject_topic_unstem_search"/>
626
-
627
- <!-- sort fields -->
628
- <copyField source="pub_date" dest="pub_date_sort"/>
629
-
630
-
631
- <!-- spellcheck fields -->
632
- <!-- default spell check; should match fields for default request handler -->
633
- <!-- it won't work with a copy of a copy field -->
634
- <copyField source="*_t" dest="spell"/>
635
- <copyField source="*_facet" dest="spell"/>
636
- <!-- title spell check; should match fields for title request handler -->
637
- <copyField source="title_t" dest="title_spell"/>
638
- <copyField source="subtitle_t" dest="title_spell"/>
639
- <copyField source="addl_titles_t" dest="title_spell"/>
640
- <copyField source="title_added_entry_t" dest="title_spell"/>
641
- <copyField source="title_series_t" dest="title_spell"/>
642
- <!-- author spell check; should match fields for author request handler -->
643
- <copyField source="author_t" dest="author_spell"/>
644
- <copyField source="author_addl_t" dest="author_spell"/>
645
- <!-- subject spell check; should match fields for subject request handler -->
646
- <copyField source="subject_topic_facet" dest="subject_spell"/>
647
- <copyField source="subject_t" dest="subject_spell"/>
648
- <copyField source="subject_addl_t" dest="subject_spell"/>
649
-
650
- <!-- OpenSearch query field should match request handler search fields -->
651
- <copyField source="title_t" dest="opensearch_display"/>
652
- <copyField source="subtitle_t" dest="opensearch_display"/>
653
- <copyField source="addl_titles_t" dest="opensearch_display"/>
654
- <copyField source="title_added_entry_t" dest="opensearch_display"/>
655
- <copyField source="title_series_t" dest="opensearch_display"/>
656
- <copyField source="author_t" dest="opensearch_display"/>
657
- <copyField source="author_addl_t" dest="opensearch_display"/>
658
- <copyField source="subject_topic_facet" dest="opensearch_display"/>
659
- <copyField source="subject_t" dest="opensearch_display"/>
660
- <copyField source="subject_addl_t" dest="opensearch_display"/>
661
-
662
-
663
- <!-- Above, multiple source fields are copied to the [text] field.
664
- Another way to map multiple source fields to the same
665
- destination field is to use the dynamic field syntax.
666
- copyField also supports a maxChars to copy setting. -->
667
-
668
- <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
669
- <copyField source="*_s" dest="text"/>
670
- <copyField source="*_t" dest="text"/>
671
- <copyField source="*_facet" dest="text"/>
672
-
673
- <!-- copy name to alphaNameSort, a field designed for sorting by name -->
674
- <!-- <copyField source="name" dest="alphaNameSort"/> -->
675
-
676
-
677
- <!-- Similarity is the scoring routine for each document vs. a query.
678
- A custom similarity may be specified here, but the default is fine
679
- for most applications. -->
680
- <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
681
- <!-- ... OR ...
682
- Specify a SimilarityFactory class name implementation
683
- allowing parameters to be used.
684
- -->
685
- <!--
686
- <similarity class="com.example.solr.CustomSimilarityFactory">
687
- <str name="paramkey">param value</str>
688
- </similarity>
689
- -->
690
-
691
-
370
+ </types>
371
+
692
372
  </schema>