active-fedora 9.8.0 → 9.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/History.txt +29 -0
  4. data/README.md +1 -1
  5. data/active-fedora.gemspec +2 -2
  6. data/config/fedora.yml +2 -2
  7. data/config/solr.yml +3 -3
  8. data/lib/active_fedora/associations/builder/belongs_to.rb +2 -5
  9. data/lib/active_fedora/associations/builder/has_and_belongs_to_many.rb +2 -5
  10. data/lib/active_fedora/config.rb +1 -1
  11. data/lib/active_fedora/fedora.rb +7 -1
  12. data/lib/active_fedora/file.rb +46 -32
  13. data/lib/active_fedora/file_configurator.rb +2 -1
  14. data/lib/active_fedora/rake_support.rb +33 -0
  15. data/lib/active_fedora/relation/finder_methods.rb +2 -1
  16. data/lib/active_fedora/solr_service.rb +6 -2
  17. data/lib/active_fedora/version.rb +1 -1
  18. data/lib/active_fedora.rb +1 -1
  19. data/lib/generators/active_fedora/config/fedora/templates/fedora.yml +2 -2
  20. data/lib/generators/active_fedora/config/solr/solr_generator.rb +1 -1
  21. data/lib/generators/active_fedora/config/solr/templates/solr/config/_rest_managed.json +3 -0
  22. data/lib/generators/active_fedora/config/solr/templates/solr/config/admin-extra.html +31 -0
  23. data/lib/generators/active_fedora/config/solr/templates/{solr_conf/solr.xml → solr/config/elevate.xml} +36 -35
  24. data/lib/generators/active_fedora/config/solr/templates/solr/config/mapping-ISOLatin1Accent.txt +246 -0
  25. data/lib/generators/active_fedora/config/solr/templates/solr/config/protwords.txt +21 -0
  26. data/lib/generators/active_fedora/config/solr/templates/{solr_conf/conf → solr/config}/schema.xml +217 -123
  27. data/lib/generators/active_fedora/config/solr/templates/solr/config/scripts.conf +24 -0
  28. data/lib/generators/active_fedora/config/solr/templates/solr/config/solrconfig.xml +297 -0
  29. data/lib/generators/active_fedora/config/solr/templates/solr/config/spellings.txt +2 -0
  30. data/lib/generators/active_fedora/config/solr/templates/solr/config/stopwords.txt +58 -0
  31. data/lib/generators/active_fedora/config/solr/templates/solr/config/stopwords_en.txt +58 -0
  32. data/lib/generators/active_fedora/config/solr/templates/solr/config/synonyms.txt +31 -0
  33. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example.xsl +132 -0
  34. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_atom.xsl +67 -0
  35. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/example_rss.xsl +66 -0
  36. data/lib/generators/active_fedora/config/solr/templates/solr/config/xslt/luke.xsl +337 -0
  37. data/lib/generators/active_fedora/config/solr/templates/solr.yml +2 -2
  38. data/lib/tasks/active_fedora_dev.rake +12 -13
  39. data/solr/config/solrconfig.xml +60 -182
  40. data/spec/fixtures/rails_root/config/fedora.yml +8 -0
  41. data/spec/integration/date_time_properties_spec.rb +15 -4
  42. data/spec/unit/config_spec.rb +8 -3
  43. data/spec/unit/fedora_spec.rb +20 -0
  44. data/spec/unit/file_configurator_spec.rb +9 -0
  45. data/spec/unit/file_spec.rb +105 -0
  46. data/spec/unit/finder_methods_spec.rb +34 -0
  47. data/spec/unit/solr_service_spec.rb +25 -0
  48. metadata +24 -10
  49. data/config/jetty.yml +0 -6
  50. data/lib/generators/active_fedora/config/solr/templates/solr_conf/conf/solrconfig.xml +0 -218
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb7bb622089037ec0a49870417c31aedf0b2b3c1
4
- data.tar.gz: 077acf9671652587082be135de13ca1afa05b709
3
+ metadata.gz: f5ecd9f636c3db3dc10bd6d83a91f7a279b002ad
4
+ data.tar.gz: 9d479bd9af1691992fc227386e52cd12f93a9f6e
5
5
  SHA512:
6
- metadata.gz: 8cee9e01316cd57089335922d058f7bb537f3845c5da764601be842331707ac1ef175ecd20e6bc8e7cb759b432ec752b0fe9bcda08877b10dea2a72f97a2fc76
7
- data.tar.gz: 23964a8f464c39dd2d0c53f5f6418337c76235489d2924895af34d979c214e551999b430d0072d28d6243e7c06114f170eecb8a6e9124664715e82b342f4c1f2
6
+ metadata.gz: 9c791a3b110cce3af5e7a290e5f60f3a0ac505e737ef081ce2e8a8295c5d276cdafe3da753ba02e08a08e2781de9e93c74775a7656c5583aba56ff26b28ee7ba
7
+ data.tar.gz: 0307cb665d50fe8413bc776a2cb3af74a8dfee911c41ce0a9270a4ce93177ccb72cc4827cb34a61ef21fe85d8937e1931062150e0ce30a00cbb0a9f92d03a3b0
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ bin
14
14
  .ruby-gemset
15
15
  gemfiles/*.gemfile.lock
16
16
  /fcrepo4-data
17
+ /fcrepo4-test-data
data/History.txt CHANGED
@@ -1,3 +1,32 @@
1
+ v9.9.0
2
+ 2016-02-15: Update development configs to use environment variables [Justin
3
+ Coyne]
4
+
5
+ 2016-02-15: Pin to a version of rubocop-rspec that doesn't complain about our
6
+ code [Justin Coyne]
7
+
8
+ 2016-02-15: Generalize the with_server method [Justin Coyne]
9
+
10
+ 2016-02-12: Use local configurations for solr [Justin Coyne]
11
+
12
+ 2016-02-12: Share the test server method with downstream apps [Justin Coyne]
13
+
14
+ 2016-02-12: Add support for customizable Solr request handlers. [Olli Lyytinen]
15
+
16
+ 2016-02-10: Adds SSL options to config (closes #985) [David Chandek-Stark]
17
+
18
+ 2016-02-09: XMLSchema#dateTime requires a colon in the timezone [Justin Coyne]
19
+
20
+ 2016-02-09: Add a rake task for running spec without rubocop [Justin Coyne]
21
+
22
+ 2016-02-09: Use the correct flag to fcrepo_wrapper [Justin Coyne]
23
+
24
+ 2016-02-09: Fixes for rubocop 0.37.1 [Justin Coyne]
25
+
26
+ 2016-02-08: Don't default facet.limit [Justin Coyne]
27
+
28
+ 2016-02-05: Start solr and fedora on a random open port [Justin Coyne]
29
+
1
30
  v9.8.0
2
31
  2016-02-04: Remove unused files [Justin Coyne]
3
32
 
data/README.md CHANGED
@@ -83,7 +83,7 @@ You can switch `hydra-test` to `hydra-dev` if you want to create a collection fo
83
83
  To start FCRepo, open another shell and run:
84
84
 
85
85
  ```bash
86
- fedora_wrapper -p 8984
86
+ fcrepo_wrapper -p 8984
87
87
  ```
88
88
 
89
89
  Now you’re ready to run the tests. In the directory where active\_fedora
@@ -28,13 +28,13 @@ Gem::Specification.new do |s|
28
28
  s.add_development_dependency "yard"
29
29
  s.add_development_dependency "rake"
30
30
  s.add_development_dependency "solr_wrapper", "~> 0.4"
31
- s.add_development_dependency 'fcrepo_wrapper', '~> 0.1'
31
+ s.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
32
32
  s.add_development_dependency "rspec", "~> 3.0"
33
33
  s.add_development_dependency "rspec-its"
34
34
  s.add_development_dependency "equivalent-xml"
35
35
  s.add_development_dependency "simplecov", '~> 0.7.1'
36
36
  s.add_development_dependency "rubocop", '~> 0.34'
37
- s.add_development_dependency "rubocop-rspec", '~> 1.3'
37
+ s.add_development_dependency "rubocop-rspec", '~> 1.3.1'
38
38
 
39
39
  s.files = `git ls-files`.split("\n")
40
40
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
data/config/fedora.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  development:
2
2
  user: fedoraAdmin
3
3
  password: fedoraAdmin
4
- url: http://127.0.0.1:8984/rest
4
+ url: http://127.0.0.1:<%= ENV['FCREPO_DEVELOPMENT_PORT'] || 8984 %>/rest
5
5
  base_path: /dev
6
6
  test:
7
7
  user: fedoraAdmin
8
8
  password: fedoraAdmin
9
- url: http://localhost:8984/rest
9
+ url: http://localhost:<%= ENV['FCREPO_TEST_PORT'] || 8986 %>/rest
10
10
  base_path: /test
11
11
  production:
12
12
  user: fedoraAdmin
data/config/solr.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  development:
2
2
  default:
3
- url: http://localhost:8983/solr/hydra-dev
3
+ url: http://127.0.0.1:<%= ENV['SOLR_TEST_PORT'] || 8983 %>/solr/hydra-development
4
4
  full_text:
5
5
  url: http://localhost:8983/solr/development
6
6
  test:
7
7
  default:
8
- url: http://localhost:8983/solr/hydra-test
8
+ url: http://localhost:<%= ENV['SOLR_TEST_PORT'] || 8985 %>/solr/hydra-test
9
9
  full_text:
10
- url: http://localhost:8983/solr/test
10
+ url: http://localhost:<%= ENV['SOLR_TEST_PORT'] || 8985 %>/solr/test
11
11
  production:
12
12
  default:
13
13
  url: http://localhost:8080/solr/production
@@ -4,11 +4,8 @@ module ActiveFedora::Associations::Builder
4
4
 
5
5
  def validate_options
6
6
  super
7
- if !options[:predicate]
8
- raise "You must specify a predicate for #{name}"
9
- elsif !options[:predicate].is_a?(RDF::URI)
10
- raise ArgumentError, "Predicate must be a kind of RDF::URI"
11
- end
7
+ raise "You must specify a predicate for #{name}" unless options[:predicate]
8
+ raise ArgumentError, "Predicate must be a kind of RDF::URI" unless options[:predicate].is_a?(RDF::URI)
12
9
  end
13
10
  end
14
11
  end
@@ -8,11 +8,8 @@ module ActiveFedora::Associations::Builder
8
8
  def validate_options
9
9
  super
10
10
  Deprecation.warn HasAndBelongsToMany, ":solr_page_size doesn't do anything anymore and will be removed in ActiveFedora 10" if options.key?(:solr_page_size)
11
- if !options[:predicate]
12
- raise "You must specify a predicate for #{name}"
13
- elsif !options[:predicate].is_a?(RDF::URI)
14
- raise ArgumentError, "Predicate must be a kind of RDF::URI"
15
- end
11
+ raise "You must specify a predicate for #{name}" unless options[:predicate]
12
+ raise ArgumentError, "Predicate must be a kind of RDF::URI" unless options[:predicate].is_a?(RDF::URI)
16
13
  end
17
14
  end
18
15
  end
@@ -2,7 +2,7 @@ module ActiveFedora
2
2
  class Config
3
3
  attr_reader :credentials
4
4
  def initialize(val)
5
- @credentials = val.symbolize_keys
5
+ @credentials = val.deep_symbolize_keys
6
6
  return if @credentials.key?(:url)
7
7
  raise ActiveFedora::ConfigurationError, "Fedora configuration must provide :url."
8
8
  end
@@ -21,6 +21,10 @@ module ActiveFedora
21
21
  @config[:password]
22
22
  end
23
23
 
24
+ def ssl_options
25
+ @config[:ssl]
26
+ end
27
+
24
28
  def connection
25
29
  # The InboundRelationConnection does provide more data, useful for
26
30
  # things like ldp:IndirectContainers, but it's imposes a significant
@@ -58,7 +62,9 @@ module ActiveFedora
58
62
  end
59
63
 
60
64
  def authorized_connection
61
- connection = Faraday.new(host)
65
+ options = {}
66
+ options[:ssl] = ssl_options if ssl_options
67
+ connection = Faraday.new(host, options)
62
68
  connection.basic_auth(user, password)
63
69
  connection
64
70
  end
@@ -23,7 +23,7 @@ module ActiveFedora
23
23
 
24
24
  generate_method 'content'
25
25
 
26
- define_model_callbacks :save, :create, :destroy
26
+ define_model_callbacks :update, :save, :create, :destroy
27
27
  define_model_callbacks :initialize, only: :after
28
28
 
29
29
  # @param parent_or_url_or_hash [ActiveFedora::Base, RDF::URI, String, Hash, NilClass] the parent resource or the URI of this resource
@@ -32,29 +32,31 @@ module ActiveFedora
32
32
  # @yield [self] Yields self
33
33
  # @yieldparam [File] self the newly created file
34
34
  def initialize(parent_or_url_or_hash = nil, path = nil, _options = {}, &_block)
35
- case parent_or_url_or_hash
36
- when Hash
37
- @ldp_source = build_ldp_resource_via_uri
38
- when nil
39
- @ldp_source = build_ldp_resource_via_uri nil
40
- when String, ::RDF::URI
41
- id = ActiveFedora::Associations::IDComposite.new([parent_or_url_or_hash], translate_uri_to_id).first
42
- @ldp_source = build_ldp_resource id
43
- when ActiveFedora::Base
44
- Deprecation.warn File, "Initializing a file by passing a container is deprecated. Initialize with a uri instead. This capability will be removed in active-fedora 10.0"
45
- uri = if parent_or_url_or_hash.uri.is_a?(::RDF::URI) && parent_or_url_or_hash.uri.value.empty?
46
- nil
47
- else
48
- "#{parent_or_url_or_hash.uri}/#{path}"
49
- end
50
- @ldp_source = build_ldp_resource_via_uri(uri, nil)
35
+ run_callbacks(:initialize) do
36
+ case parent_or_url_or_hash
37
+ when Hash
38
+ @ldp_source = build_ldp_resource_via_uri
39
+ when nil
40
+ @ldp_source = build_ldp_resource_via_uri nil
41
+ when String, ::RDF::URI
42
+ id = ActiveFedora::Associations::IDComposite.new([parent_or_url_or_hash], translate_uri_to_id).first
43
+ @ldp_source = build_ldp_resource id
44
+ when ActiveFedora::Base
45
+ Deprecation.warn File, "Initializing a file by passing a container is deprecated. Initialize with a uri instead. This capability will be removed in active-fedora 10.0"
46
+ uri = if parent_or_url_or_hash.uri.is_a?(::RDF::URI) && parent_or_url_or_hash.uri.value.empty?
47
+ nil
48
+ else
49
+ "#{parent_or_url_or_hash.uri}/#{path}"
50
+ end
51
+ @ldp_source = build_ldp_resource_via_uri(uri, nil)
51
52
 
52
- else
53
- raise "The first argument to #{self} must be a String or an ActiveFedora::Base. You provided a #{parent_or_url_or_hash.class}"
54
- end
53
+ else
54
+ raise "The first argument to #{self} must be a String or an ActiveFedora::Base. You provided a #{parent_or_url_or_hash.class}"
55
+ end
55
56
 
56
- @attributes = {}.with_indifferent_access
57
- yield self if block_given?
57
+ @attributes = {}.with_indifferent_access
58
+ yield self if block_given?
59
+ end
58
60
  end
59
61
 
60
62
  # @return [true, false] true if the objects are equal or when the objects have uris
@@ -188,6 +190,10 @@ module ActiveFedora
188
190
  false
189
191
  end
190
192
 
193
+ def destroy(*)
194
+ run_callbacks(:destroy) { super }
195
+ end
196
+
191
197
  def self.relation
192
198
  FileRelation.new(self)
193
199
  end
@@ -219,21 +225,29 @@ module ActiveFedora
219
225
  end
220
226
 
221
227
  def create_record(_options = {})
222
- return false if content.nil?
223
- ldp_source.content = content
224
- ldp_source.create do |req|
225
- req.headers.merge!(ldp_headers)
228
+ run_callbacks(:create) do
229
+ run_callbacks(:save) do
230
+ return false if content.nil?
231
+ ldp_source.content = content
232
+ ldp_source.create do |req|
233
+ req.headers.merge!(ldp_headers)
234
+ end
235
+ refresh
236
+ end
226
237
  end
227
- refresh
228
238
  end
229
239
 
230
240
  def update_record(_options = {})
231
- return true unless content_changed?
232
- ldp_source.content = content
233
- ldp_source.update do |req|
234
- req.headers.merge!(ldp_headers)
241
+ run_callbacks(:update) do
242
+ run_callbacks(:save) do
243
+ return true unless content_changed?
244
+ ldp_source.content = content
245
+ ldp_source.update do |req|
246
+ req.headers.merge!(ldp_headers)
247
+ end
248
+ refresh
249
+ end
235
250
  end
236
- refresh
237
251
  end
238
252
 
239
253
  def build_ldp_resource(id)
@@ -143,7 +143,8 @@ module ActiveFedora
143
143
 
144
144
  config = solr_yml.symbolize_keys
145
145
  raise "The #{ActiveFedora.environment.to_sym} environment settings were not found in the solr.yml config. If you already have a solr.yml file defined, make sure it defines settings for the #{ActiveFedora.environment.to_sym} environment" unless config[ActiveFedora.environment.to_sym]
146
- @solr_config = { url: solr_url(config[ActiveFedora.environment.to_sym].symbolize_keys) }
146
+ config = config[ActiveFedora.environment.to_sym].symbolize_keys
147
+ @solr_config = { url: solr_url(config) }.merge(config.slice(:update_path, :select_path))
147
148
  end
148
149
 
149
150
  # Given the solr_config that's been loaded for this environment,
@@ -0,0 +1,33 @@
1
+ # Starts a fedora server and a solr server on a random port and then
2
+ # yields the passed block
3
+ def with_test_server(&block)
4
+ with_server('test', &block)
5
+ end
6
+
7
+ def with_server(environment, fcrepo_port: nil, solr_port: nil)
8
+ return yield if ENV["#{environment}_SERVER_STARTED"]
9
+
10
+ ENV["#{environment}_SERVER_STARTED"] = 'true'
11
+
12
+ # setting port: nil assigns a random port.
13
+ solr_params = { port: solr_port, verbose: true, managed: true }
14
+ fcrepo_params = { port: fcrepo_port, verbose: true, managed: true,
15
+ enable_jms: false, fcrepo_home_dir: "fcrepo4-#{environment}-data" }
16
+ SolrWrapper.wrap(solr_params) do |solr|
17
+ ENV["SOLR_#{environment.upcase}_PORT"] = solr.port
18
+ solr_config_path = File.join('solr', 'config')
19
+ # Check to see if configs exist in a path relative to the working directory
20
+ unless Dir.exist?(solr_config_path)
21
+ $stderr.puts "Solr configuration not found at #{solr_config_path}. Using ActiveFedora defaults"
22
+ # Otherwise use the configs delivered with ActiveFedora.
23
+ solr_config_path = File.join(File.expand_path("../..", File.dirname(__FILE__)), "solr", "config")
24
+ end
25
+ solr.with_collection(name: "hydra-#{environment}", dir: solr_config_path) do
26
+ FcrepoWrapper.wrap(fcrepo_params) do |fcrepo|
27
+ ENV["FCREPO_#{environment.upcase}_PORT"] = fcrepo.port
28
+ yield
29
+ end
30
+ end
31
+ end
32
+ ENV["#{environment}_SERVER_STARTED"] = 'false'
33
+ end
@@ -151,11 +151,12 @@ module ActiveFedora
151
151
  opts[:sort] = @klass.default_sort_params unless opts[:sort].present?
152
152
 
153
153
  batch_size = opts.delete(:batch_size) || 1000
154
+ select_path = ActiveFedora::SolrService.select_path
154
155
 
155
156
  counter = 0
156
157
  loop do
157
158
  counter += 1
158
- response = ActiveFedora::SolrService.instance.conn.paginate counter, batch_size, "select", params: opts
159
+ response = ActiveFedora::SolrService.instance.conn.paginate counter, batch_size, select_path, params: opts
159
160
  docs = response["response"]["docs"]
160
161
  yield docs
161
162
  break unless docs.has_next?
@@ -23,11 +23,15 @@ module ActiveFedora
23
23
  Thread.current[:solr_service] = nil
24
24
  end
25
25
 
26
+ def select_path
27
+ ActiveFedora.solr_config.fetch(:select_path, 'select')
28
+ end
29
+
26
30
  def instance
27
31
  # Register Solr
28
32
 
29
33
  unless Thread.current[:solr_service]
30
- register(ActiveFedora.solr_config[:url])
34
+ register(ActiveFedora.solr_config[:url], ActiveFedora.solr_config)
31
35
  end
32
36
 
33
37
  raise SolrNotInitialized unless Thread.current[:solr_service]
@@ -104,7 +108,7 @@ module ActiveFedora
104
108
  def query(query, args = {})
105
109
  raw = args.delete(:raw)
106
110
  args = args.merge(q: query, qt: 'standard')
107
- result = SolrService.instance.conn.get('select', params: args)
111
+ result = SolrService.instance.conn.get(select_path, params: args)
108
112
  return result if raw
109
113
  result['response']['docs']
110
114
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "9.8.0".freeze
2
+ VERSION = "9.9.0".freeze
3
3
  end
data/lib/active_fedora.rb CHANGED
@@ -21,7 +21,7 @@ module RDF
21
21
  ALTERNATIVE_FORMAT = '%Y-%m-%dT%H:%M:%S'.freeze
22
22
  DOT = '.'.freeze
23
23
  EMPTY = ''.freeze
24
- TIMEZONE_FORMAT = '%z'.freeze
24
+ TIMEZONE_FORMAT = '%:z'.freeze
25
25
 
26
26
  def to_s
27
27
  @string ||= begin
@@ -1,12 +1,12 @@
1
1
  development:
2
2
  user: fedoraAdmin
3
3
  password: fedoraAdmin
4
- url: http://127.0.0.1:8984/rest
4
+ url: http://127.0.0.1:<%= ENV['FCREPO_DEVELOPMENT_PORT'] || 8984 %>/rest
5
5
  base_path: /dev
6
6
  test:
7
7
  user: fedoraAdmin
8
8
  password: fedoraAdmin
9
- url: http://localhost:8984/rest
9
+ url: http://127.0.0.1:<%= ENV['FCREPO_TEST_PORT'] || 8986 %>/rest
10
10
  base_path: /test
11
11
  production:
12
12
  user: fedoraAdmin
@@ -7,7 +7,7 @@ module ActiveFedora
7
7
  def generate
8
8
  # Overwrite the configuration files that Blacklight has installed
9
9
  copy_file 'solr.yml', 'config/solr.yml', force: true
10
- directory 'solr_conf', 'solr_conf'
10
+ directory 'solr', 'solr'
11
11
  end
12
12
  end
13
13
  end
@@ -0,0 +1,3 @@
1
+ {
2
+ "initArgs":{},
3
+ "managedList":[]}
@@ -0,0 +1,31 @@
1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ <!-- The content of this page will be statically included into the top
19
+ of the admin page. Uncomment this as an example to see there the content
20
+ will show up.
21
+
22
+ <hr>
23
+ <i>This line will appear before the first table</i>
24
+ <tr>
25
+ <td colspan="2">
26
+ This row will be appended to the end of the first table
27
+ </td>
28
+ </tr>
29
+ <hr>
30
+
31
+ -->
@@ -1,35 +1,36 @@
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
- -->
18
-
19
- <!--
20
- All (relative) paths are relative to the installation path
21
-
22
- persistent: Save changes made via the API to this file
23
- sharedLib: path to a lib directory that will be shared across all cores
24
- -->
25
- <solr persistent="false" sharedLib="lib">
26
-
27
- <!--
28
- adminPath: RequestHandler path to manage cores.
29
- If 'null' (or absent), cores will not be manageable via REST
30
- -->
31
- <cores adminPath="/admin/cores" defaultCoreName="development">
32
- <core name="development" instanceDir="development-core" />
33
- <core name="test" instanceDir="test-core" />
34
- </cores>
35
- </solr>
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
+ -->
18
+
19
+ <!-- If this file is found in the config directory, it will only be
20
+ loaded once at startup. If it is found in Solr's data
21
+ directory, it will be re-loaded every commit.
22
+ -->
23
+
24
+ <elevate>
25
+ <query text="foo bar">
26
+ <doc id="1" />
27
+ <doc id="2" />
28
+ <doc id="3" />
29
+ </query>
30
+
31
+ <query text="ipod">
32
+ <doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
33
+ <doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
34
+ </query>
35
+
36
+ </elevate>