solrizer 3.0.0.pre4 → 3.0.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,7 +3,6 @@ source "http://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rcov', :platform => :mri_18
7
6
  gem 'simplecov', :platform => :mri_19
8
7
  gem 'simplecov-rcov', :platform => :mri_19
9
8
  end
@@ -25,10 +25,7 @@ h2. Usage
25
25
 
26
26
  h3. Fire up the console:
27
27
 
28
- The code snippets in the following sections can be cut/paste into your console, giving you the opportunity to play with Solrizer
29
- and demonstrate the functionality underlying the implementation-specific gems, such as solrizer-fedora.
30
-
31
-
28
+ The code snippets in the following sections can be cut/pasted into your console, giving you the opportunity to play with Solrizer.
32
29
 
33
30
  Start up a console and load solrizer:
34
31
 
@@ -41,54 +38,118 @@ require "solrizer"
41
38
 
42
39
  h3. Field Mapper
43
40
 
44
- The FieldMapper maps term names and values to Solr fields, based on the term’s data type and any index_as options. Solrizer comes with default mappings (which are defined in the config/solr_mappings.yml):
41
+ The FieldMapper maps term names and values to Solr fields, based on the term’s data type and any index_as options. Solrizer comes with default mappings (which are defined in the config/solr_mappings.yml) to dynamic field types defined in the Hydra Solr schema.xml file. A copy of that is available :
42
+ https://github.com/projecthydra/hydra-head/blob/master/hydra-core/lib/generators/hydra/templates/solr_conf/conf/schema.xml
43
+
44
+ More information on the conventions followed for the dynamic solr fields is here:
45
+ https://github.com/projecthydra/hydra-head/wiki/Solr-Schema
45
46
 
46
47
  <pre>
47
48
  default_mapper = Solrizer::FieldMapper::Default.new
48
49
 
49
50
  # some of the default mappings in solrizer
50
- default_mapper.solr_name("foo",:string) # returns foo_t
51
- default_mapper.solr_name("foo",:date) # returns foo_dt
52
- default_mapper.solr_name("foo",:integer) # returns foo_i
53
- default_mapper.solr_name("foo",:string,:facetable) # returns foo_facet
54
- default_mapper.solr_name("foo",:text,:facetable) # returns foo_facet
55
- default_mapper.solr_name("foo",:integer,:facetable) # returns foo_facet
51
+ default_mapper.solr_name("foo",:string,:searchable) # returns foo_tesim
52
+ default_mapper.solr_name("foo",:date,:searchable) # returns foo_dtsim
53
+ default_mapper.solr_name("foo",:integer,:searchable # returns foo_isim
54
+ default_mapper.solr_name("foo",:string,:facetable) # returns foo_sim
55
+ default_mapper.solr_name("foo",:integer,:facetable) # returns foo_iim
56
+ default_mapper.solr_name("foo",:string,:sortable) # returns foo_si
57
+ default_mapper.solr_name("foo",:string,:displayable) # returns foo_ssm
56
58
  </pre>
57
59
 
58
- FieldMapper provides some defaults:
60
+ ## Using default indexing strategies
59
61
 
60
62
  <pre>
61
- default_mapper.solr_names_and_values("foo","bar",:string,[:facetable]) # returns searchable and facetable by default => {"foo_facet"=>["bar"], "foo_t"=>["bar"]}
62
- default_mapper.solr_names_and_values("foo","bar",:string,[:not_searchable, :facetable]) # returns just facetable => {"foo_facet"=>["bar"]}
63
+ solr_doc = {}
64
+ Solrizer.insert_field(solr_doc, 'title', 'whatever', :searchable)
65
+ => {"title_tesim"=>["whatever"]}
66
+
67
+ Solrizer.insert_field(solr_doc, 'pub_date', 'Nov 2012', :sortable, :displayable)
68
+ => {"title_tesim"=>["whatever"], "pub_date_ssi"=>["Nov 2012"], "pub_date_ssm"=>["Nov 2012"]}
63
69
  </pre>
64
70
 
65
- Which can be tweaked:
71
+ #### You can also index dates
72
+ <pre>
73
+ # as a date
74
+ solr_doc = {}
75
+ Solrizer.insert_field(solr_doc, 'pub_date', Date.parse('Nov 7th 2012'), :searchable)
76
+ => {"pub_date_dtsi"=>["2012-11-07T00:00:00Z"]}
77
+
78
+ # or as a string
79
+ solr_doc = {}
80
+ Solrizer.insert_field(solr_doc, 'pub_date', Date.parse('Nov 7th 2012'), :sortable, :displayable)
81
+ => {"pub_date_ssi"=>["2012-11-07"], "pub_date_ssm"=>["2012-11-07"]}
82
+
83
+ # or a string that is stored as a date
84
+ solr_doc = {}
85
+ Solrizer.insert_field(solr_doc, 'pub_date', 'Jan 29th 2013', :dateable)
86
+ => {"pub_date_dtsi"=>["2013-01-29T00:00:00Z"]}
87
+ </pre>
66
88
 
89
+
90
+ ## Using a custom indexing strategy
91
+ All you have to do is create your own index descriptor:
67
92
  <pre>
68
- default_mapper.default_index_types << :facetable
69
- default_mapper.solr_names_and_values("foo","bar",:string,[]) # returns searchable and facetable by default => {"foo_facet"=>["bar"], "foo_t"=>["bar"]}
93
+ solr_doc = {}
94
+ displearchable = Solrizer::Descriptor.new(:integer, :indexed, :stored)
95
+ Solrizer.insert_field(solr_doc, 'some_count', 45, displearchable)
96
+ {"some_count_isi"=>["45"]}
70
97
  </pre>
71
98
 
72
- Custom Mappings can also be provided (with custom converters):
99
+ ## Changing the behavior of a default descriptor
73
100
 
101
+ Simply override the methods within Solrizer::DefaultDescriptors
74
102
  <pre>
75
- class CustomMapper < Solrizer::FieldMapper
76
- index_as :searchable, :suffix => "_search" do |type|
77
- type.reversed :suffix => "_reverse" do |value|
78
- value.reverse
103
+ # before
104
+ solr_doc = {}
105
+ Solrizer.insert_field(solr_doc, 'title', 'foobar', :facetable)
106
+ => {"title_sim"=>["foobar"]}
107
+
108
+ # redefine facetable:
109
+ module Solrizer
110
+ module DefaultDescriptors
111
+ def self.facetable
112
+ Descriptor.new(:string, :indexed, :stored)
79
113
  end
80
114
  end
81
115
  end
116
+
117
+ # after
118
+ solr_doc = {}
119
+ Solrizer.insert_field(solr_doc, 'title', 'foobar', :facetable)
120
+ => {"title_ssi"=>["foobar"]}
82
121
  </pre>
83
122
 
123
+
124
+ ## Creating your own Indexers
84
125
  <pre>
85
- custom_mapper = CustomMapper.new
126
+ module MyMappers
127
+ def self.mapper_one
128
+ Solrizer::Descriptor.new(:string, :indexed, :stored)
129
+ end
130
+ end
131
+
132
+ solr_doc = {}
133
+
134
+ Solrizer::FieldMapper.descriptors = [MyMappers]
135
+ => [MyMappers]
86
136
 
87
- custom_mapper.solr_names_and_values("foo","bar",:string,[:searchable]) # returns {"foo_search"=>["bar"]}
88
- custom_mapper.solr_names_and_values("foo","bar",:reversed,[:searchable]) # returns {"foo_reverse"=>["rab"]}
137
+ Solrizer.insert_field(solr_doc, 'title', 'foobar', :mapper_one)
138
+ => {"title_ssi"=>["foobar"]}
89
139
  </pre>
90
140
 
91
- For more detailed information on custom mappings, see the documetnation for the FieldMapper class.
141
+ ## Using OM
142
+ Same as it ever was:
143
+ <pre>
144
+ t.main_title(:index_as=>[:facetable],:path=>"title", :label=>"title") { ... }
145
+ </pre>
146
+
147
+ But now you may also pass an Descriptor instance if that works for you:
148
+ <pre>
149
+ indexer = Solrizer::Descriptor.new(:integer, :indexed, :stored)
150
+ t.main_title(:index_as=>[indexer],:path=>"title", :label=>"title") { ... }
151
+
152
+ </pre>
92
153
 
93
154
  h3. Extractor and Extractor Mixins
94
155
 
@@ -113,7 +174,7 @@ h4. Solrizer provides some default mixins:
113
174
  <pre>
114
175
  xml = "<fields><foo>bar</foo><bar>baz</bar></fields>"
115
176
 
116
- extractor.xml_to_solr(xml) # returns {:foo_t=>"bar", :bar_t=>"baz"}
177
+ extractor.xml_to_solr(xml) # returns {:foo_tesim=>"bar", :bar_tesim=>"baz"}
117
178
  </pre>
118
179
 
119
180
  h4. Solrizer::XML::TerminologyBasedSolrizer
@@ -23,6 +23,11 @@ module Solrizer
23
23
  @@default_field_mapper = field_mapper
24
24
  end
25
25
 
26
+
27
+ def self.solr_name(*args)
28
+ default_field_mapper.solr_name(*args)
29
+ end
30
+
26
31
  # @params [Hash] doc the hash to insert the value into
27
32
  # @params [String] name the name of the field (without the suffix)
28
33
  # @params [String,Date] value the value to be inserted
@@ -1,16 +1,13 @@
1
1
  module Solrizer
2
2
  module DefaultDescriptors
3
3
 
4
- # Produces a _sim suffix
5
- def self.facetable
6
- @facetable ||= Descriptor.new(:string, :indexed, :multivalued)
7
- end
8
-
9
- # Most interesting case because the suffixe produced depends on the type parameter
10
- # produces suffixes:
4
+ # The suffix produced depends on the type parameter -- produces suffixes:
11
5
  # _tesim - for strings or text fields
12
6
  # _dtsim - for dates
13
7
  # _isim - for integers
8
+ # Note that searchable fields are also stored for backwards compatibilitiy
9
+ # TODO: make a searchable and stored field type ("searchable_and_displayable" like "search and destroy"? "displearchable" ?)
10
+ # and then make searchable not stored.
14
11
  def self.searchable
15
12
  @searchable ||= Descriptor.new(searchable_field_definition, converter: searchable_converter, requires_type: true)
16
13
  end
@@ -19,25 +16,30 @@ module Solrizer
19
16
  # produces suffixes:
20
17
  # _dtsi - for dates
21
18
  def self.dateable
22
- @dateable ||= Descriptor.new(:date, :stored, :indexed, converter: dateable_converter)
19
+ @dateable ||= Descriptor.new(:date, :stored, :indexed, :multivalued, converter: dateable_converter)
23
20
  end
24
21
 
25
- # Produces a _ssim suffix
22
+ # Produces _sim suffix
23
+ def self.facetable
24
+ @facetable ||= Descriptor.new(:string, :indexed, :multivalued)
25
+ end
26
+
27
+ # Produces _ssim suffix; should probably be deprecated
26
28
  def self.symbol
27
29
  @symbol ||= Descriptor.new(:string, :stored, :indexed, :multivalued)
28
30
  end
29
31
 
30
- # Produces a _ssi suffix
32
+ # Produces _si suffix
31
33
  def self.sortable
32
- @sortable ||= Descriptor.new(:string, :indexed, :stored)
34
+ @sortable ||= Descriptor.new(:string, :indexed)
33
35
  end
34
36
 
35
- # Produces a _ssm suffix
37
+ # Produces _ssm suffix
36
38
  def self.displayable
37
39
  @displayable ||= Descriptor.new(:string, :stored, :multivalued)
38
40
  end
39
41
 
40
- # Produces a _tim suffix (used to be _unstem)
42
+ # Produces _tim suffix (used to be _unstem)
41
43
  def self.unstemmed_searchable
42
44
  @unstemmed_searchable ||= Descriptor.new(:text, :indexed, :multivalued)
43
45
  end
@@ -47,11 +49,11 @@ module Solrizer
47
49
  end
48
50
  protected
49
51
 
52
+ # note that searchable fields are also stored. Probably should change that at some point
50
53
  def self.searchable_field_definition
51
54
  lambda do |type|
52
55
  type = :text_en if [:string, :text].include?(type) # for backwards compatibility with old solr schema
53
- vals = [type, :indexed, :stored]
54
- vals << :multivalued unless [:date, :time].include? type
56
+ vals = [type, :indexed, :stored, :multivalued]
55
57
  vals
56
58
  end
57
59
  end
@@ -77,7 +79,6 @@ module Solrizer
77
79
  end
78
80
  end
79
81
 
80
-
81
82
  def self.iso8601_date(value)
82
83
  begin
83
84
  if value.is_a?(Date) || value.is_a?(Time)
@@ -48,7 +48,7 @@ module Solrizer
48
48
  {suffix_delimiter: '_',
49
49
  type_suffix: lambda do |type|
50
50
  case type
51
- when :string, :symbol # TODO `:symbol' useage ought to be deprecated
51
+ when :string, :symbol # TODO `:symbol' usage ought to be deprecated
52
52
  's'
53
53
  when :text
54
54
  't'
@@ -106,10 +106,11 @@ module Solrizer
106
106
  self.id_field = self.class.id_field
107
107
  end
108
108
 
109
- # Given a specific field name, data type, and index type, returns the corresponding solr name.
110
-
109
+ # Given a field name, inndex_type, etc., returns the corresponding Solr name.
111
110
  # TODO field type is the input format, maybe we could just detect that?
112
- # @param index_type is a FieldDescriptor
111
+ # @param [String] field_name the ruby (term) name which will get a suffix appended to become a Solr field name
112
+ # @param opts - index_type is only needed if the FieldDescriptor requires it (e.g. :searcahble)
113
+ # @return [String] name of the solr field, based on the params
113
114
  def solr_name(field_name, *opts)
114
115
  index_type, args = if opts.first.kind_of? Hash
115
116
  [:searchable, opts.first]
@@ -133,7 +134,7 @@ module Solrizer
133
134
  end
134
135
  end
135
136
 
136
- # # @param index_type is a FieldDescriptor or a symbol that points to a method that returns a field descriptor
137
+ # @param index_type is a FieldDescriptor or a symbol that points to a method that returns a field descriptor
137
138
  def indexer(index_type)
138
139
  index_type = case index_type
139
140
  when Symbol
@@ -1,3 +1,3 @@
1
1
  module Solrizer
2
- VERSION = "3.0.0.pre4"
2
+ VERSION = "3.0.0.pre5"
3
3
  end
@@ -13,12 +13,12 @@ describe Solrizer::Common do
13
13
  it "should handle many field types" do
14
14
  solr_doc = {}
15
15
  Foo.create_and_insert_terms('my_name', 'value', [:displayable, :searchable, :sortable], solr_doc)
16
- solr_doc.should == {'my_name_ssm' => ['value'], 'my_name_ssi' => ['value'], 'my_name_tesim' => ['value']}
16
+ solr_doc.should == {'my_name_ssm' => ['value'], 'my_name_si' => ['value'], 'my_name_tesim' => ['value']}
17
17
  end
18
18
  it "should handle dates that are searchable" do
19
19
  solr_doc = {}
20
20
  Foo.create_and_insert_terms('my_name', Date.parse('2013-01-10'), [:searchable], solr_doc)
21
- solr_doc.should == {'my_name_dtsi' => ['2013-01-10T00:00:00Z']}
21
+ solr_doc.should == {'my_name_dtsim' => ['2013-01-10T00:00:00Z']}
22
22
  end
23
23
 
24
24
  it "should handle dates that are displayable" do
@@ -30,6 +30,6 @@ describe Solrizer::Common do
30
30
  it "should handle dates that are sortable" do
31
31
  solr_doc = {}
32
32
  Foo.create_and_insert_terms('my_name', Date.parse('2013-01-10'), [:sortable], solr_doc)
33
- solr_doc.should == {'my_name_ssi' => ['2013-01-10']}
33
+ solr_doc.should == {'my_name_si' => ['2013-01-10']}
34
34
  end
35
35
  end
@@ -151,7 +151,7 @@ describe Solrizer::FieldMapper do
151
151
  end
152
152
 
153
153
  describe '.solr_name' do
154
- it "should map based on index_as" do
154
+ it "should map based on passed descriptors" do
155
155
  @mapper.solr_name('bar', :edible).should == 'bar_food'
156
156
  @mapper.solr_name('bar', :laughable, type: :string).should == 'bar_haha'
157
157
  end
@@ -190,7 +190,7 @@ describe Solrizer::FieldMapper do
190
190
  end
191
191
 
192
192
  describe '.solr_names_and_values' do
193
- it "should map values based on index_as" do
193
+ it "should map values based on passed descriptors" do
194
194
  @mapper.solr_names_and_values('foo', 'bar', [:searchable, :laughable, :edible]).should == {
195
195
  'foo_s' => ['bar'],
196
196
  'foo_food' => ['bar'],
@@ -252,18 +252,18 @@ describe Solrizer::FieldMapper do
252
252
  end
253
253
 
254
254
  it "should support full ISO 8601 dates" do
255
- @mapper.solr_names_and_values('foo', "2012-11-06", [:dateable]).should == { 'foo_dtsi' =>["2012-11-06T00:00:00Z"] }
256
- @mapper.solr_names_and_values('foo', "November 6th, 2012", [:dateable]).should == { 'foo_dtsi' =>["2012-11-06T00:00:00Z"] }
257
- @mapper.solr_names_and_values('foo', "6 Nov. 2012", [:dateable]).should == { 'foo_dtsi' =>["2012-11-06T00:00:00Z"] }
258
- @mapper.solr_names_and_values('foo', '', [:dateable]).should == { 'foo_dtsi' => [] }
255
+ @mapper.solr_names_and_values('foo', "2012-11-06", [:dateable]).should == { 'foo_dtsim' =>["2012-11-06T00:00:00Z"] }
256
+ @mapper.solr_names_and_values('foo', "November 6th, 2012", [:dateable]).should == { 'foo_dtsim' =>["2012-11-06T00:00:00Z"] }
257
+ @mapper.solr_names_and_values('foo', "6 Nov. 2012", [:dateable]).should == { 'foo_dtsim' =>["2012-11-06T00:00:00Z"] }
258
+ @mapper.solr_names_and_values('foo', '', [:dateable]).should == { 'foo_dtsim' => [] }
259
259
  end
260
260
 
261
- it "should support displayable, facetable, sortable, unstemmed" do
261
+ it "should support searchable, displayable, facetable, sortable, unstemmed" do
262
262
  @mapper.solr_names_and_values('foo', 'bar', [:searchable, :displayable, :facetable, :sortable, :unstemmed_searchable]).should == {
263
263
  "foo_tesim" => ["bar"], #searchable
264
- "foo_sim" => ["bar"], #facetable
265
264
  "foo_ssm" => ["bar"], #displayable
266
- "foo_ssi" => ["bar"], #sortable
265
+ "foo_sim" => ["bar"], #facetable
266
+ "foo_si" => ["bar"], #sortable
267
267
  "foo_tim" => ["bar"] #unstemmed_searchable
268
268
  }
269
269
  end
@@ -11,40 +11,48 @@ describe Solrizer do
11
11
  end
12
12
  it "should insert a field with multiple indexers" do
13
13
  Solrizer.insert_field(doc, 'foo', 'A name', :sortable, :facetable)
14
- doc.should == {'foo_ssi' => ['A name'], 'foo_sim' => ['A name']}
14
+ doc.should == {'foo_si' => ['A name'], 'foo_sim' => ['A name']}
15
15
  end
16
16
  it "should insert Dates" do
17
17
  Solrizer.insert_field(doc, 'foo', Date.parse('2013-01-13'))
18
- doc.should == {'foo_dtsi' => ["2013-01-13T00:00:00Z"]}
18
+ doc.should == {'foo_dtsim' => ["2013-01-13T00:00:00Z"]}
19
19
  end
20
20
  it "should insert Times" do
21
21
  Solrizer.insert_field(doc, 'foo', Time.parse('2013-01-13T22:45:56+06:00'))
22
- doc.should == {'foo_dtsi' => ["2013-01-13T16:45:56Z"]}
22
+ doc.should == {'foo_dtsim' => ["2013-01-13T16:45:56Z"]}
23
23
  end
24
24
 
25
25
  it "should insert multiple values" do
26
26
  Solrizer.insert_field(doc, 'foo', ['A name', 'B name'], :sortable, :facetable)
27
- doc.should == {'foo_ssi' => ['A name', 'B name'], 'foo_sim' => ['A name', 'B name']}
27
+ # NOTE: is this desired behavior for non-multivalued fields, like :sortable ?
28
+ doc.should == {'foo_si' => ['A name', 'B name'], 'foo_sim' => ['A name', 'B name']}
28
29
  end
29
30
  end
30
31
 
31
32
  describe "on a document with values" do
32
- before{ @doc = {'foo_ssi' => ['A name'], 'foo_sim' => ['A name']}}
33
+ before{ @doc = {'foo_si' => ['A name'], 'foo_sim' => ['A name']}}
33
34
 
34
35
  it "should not overwrite values that exist before" do
35
36
  Solrizer.insert_field(@doc, 'foo', 'B name', :sortable, :facetable)
36
- @doc.should == {'foo_ssi' => ['A name', 'B name'], 'foo_sim' => ['A name', 'B name']}
37
+ @doc.should == {'foo_si' => ['A name', 'B name'], 'foo_sim' => ['A name', 'B name']}
37
38
  end
38
39
  end
39
40
  end
40
41
  describe ".set_field" do
41
42
  describe "on a document with values" do
42
- before{ @doc = {'foo_ssi' => ['A name'], 'foo_sim' => ['A name']}}
43
+ before{ @doc = {'foo_si' => ['A name'], 'foo_sim' => ['A name']}}
43
44
 
44
45
  it "should overwrite values that exist before" do
45
46
  Solrizer.set_field(@doc, 'foo', 'B name', :sortable, :facetable)
46
- @doc.should == {'foo_ssi' => ['B name'], 'foo_sim' => ['B name']}
47
+ @doc.should == {'foo_si' => ['B name'], 'foo_sim' => ['B name']}
47
48
  end
48
49
  end
49
50
  end
51
+
52
+ describe ".solr_name" do
53
+ it "should delegate to default_field_mapper" do
54
+ Solrizer.solr_name('foo', type: :string).should == "foo_tesim"
55
+ Solrizer.solr_name('foo', :sortable).should == "foo_ssi"
56
+ end
57
+ end
50
58
  end
@@ -46,7 +46,7 @@ describe Solrizer::XML::TerminologyBasedSolrizer do
46
46
  solr_doc["topic_tag_tesim"].sort.should == ["CONTROLLED TERM", "TOPIC 1", "TOPIC 2"]
47
47
 
48
48
  # These are a holdover from an old verison of OM
49
- solr_doc['journal_0_issue_0_publication_date_dtsi'].should == ["2007-02-01T00:00:00Z"]
49
+ solr_doc['journal_0_issue_0_publication_date_dtsim'].should == ["2007-02-01T00:00:00Z"]
50
50
 
51
51
 
52
52
  end
@@ -71,7 +71,7 @@ describe Solrizer::XML::TerminologyBasedSolrizer do
71
71
  expected_names = ["DR.", "FAMILY NAME", "GIVEN NAMES"]
72
72
  %w(_tesim _sim).each do |suffix|
73
73
  actual_names = fake_solr_doc["name_0_namePart#{suffix}"].sort
74
- {suffix => actual_names}.should == {suffix => expected_names}
74
+ actual_names.should == expected_names
75
75
  end
76
76
  end
77
77
 
@@ -79,14 +79,14 @@ describe Solrizer::XML::TerminologyBasedSolrizer do
79
79
  unless RUBY_VERSION.match("1.8.7")
80
80
  solr_doc = Hash.new
81
81
  result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:pub_date), solr_doc)
82
- solr_doc["pub_date_dtsi"].should == ["2007-02-01T00:00:00Z"]
82
+ solr_doc["pub_date_dtsim"].should == ["2007-02-01T00:00:00Z"]
83
83
  end
84
84
  end
85
85
 
86
86
  it "should add fields based on type using ref" do
87
87
  solr_doc = Hash.new
88
88
  result = @mods_article.solrize_term(Samples::ModsArticle.terminology.retrieve_term(:issue_date), solr_doc)
89
- solr_doc["issue_date_dtsi"].should == ["2007-02-15T00:00:00Z"]
89
+ solr_doc["issue_date_dtsim"].should == ["2007-02-15T00:00:00Z"]
90
90
  end
91
91
 
92
92
  it "shouldn't index terms where index_as is an empty array" do
@@ -98,7 +98,7 @@ describe Solrizer::XML::TerminologyBasedSolrizer do
98
98
  fake_solr_doc["name_0_namePart_tesim"].should be_nil
99
99
  end
100
100
 
101
- it "shouldn't index terms where index_as is searchable" do
101
+ it "should index terms where index_as is searchable" do
102
102
  fake_solr_doc = {}
103
103
  term = Samples::ModsArticle.terminology.retrieve_term(:name)
104
104
  term.children[:namePart].index_as = [:searchable]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solrizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre4
4
+ version: 3.0.0.pre5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,14 +9,14 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-26 00:00:00.000000000 Z
12
+ date: 2013-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
@@ -24,7 +24,7 @@ dependencies:
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - ">="
36
36
  - !ruby/object:Gem::Version
37
37
  version: 1.5.0
38
38
  type: :runtime
@@ -40,7 +40,7 @@ dependencies:
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: 1.5.0
46
46
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ dependencies:
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - ! '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :runtime
@@ -56,7 +56,7 @@ dependencies:
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
@@ -64,7 +64,7 @@ dependencies:
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: 0.4.7
70
70
  type: :runtime
@@ -72,7 +72,7 @@ dependencies:
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ~>
75
+ - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: 0.4.7
78
78
  - !ruby/object:Gem::Dependency
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
- - - ! '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  type: :runtime
@@ -88,7 +88,7 @@ dependencies:
88
88
  version_requirements: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
- - - ! '>='
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  - !ruby/object:Gem::Dependency
@@ -96,7 +96,7 @@ dependencies:
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
- - - ! '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  type: :runtime
@@ -104,7 +104,7 @@ dependencies:
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
- - - ! '>='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  - !ruby/object:Gem::Dependency
@@ -112,7 +112,7 @@ dependencies:
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
115
- - - ! '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
@@ -120,7 +120,7 @@ dependencies:
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
123
- - - ! '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
@@ -128,7 +128,7 @@ dependencies:
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
- - - ! '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  type: :development
@@ -136,7 +136,7 @@ dependencies:
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
139
- - - ! '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  - !ruby/object:Gem::Dependency
@@ -144,7 +144,7 @@ dependencies:
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
- - - ! '>='
147
+ - - ">="
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  type: :development
@@ -152,7 +152,7 @@ dependencies:
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
- - - ! '>='
155
+ - - ">="
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  - !ruby/object:Gem::Dependency
@@ -160,7 +160,7 @@ dependencies:
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
- - - ! '>='
163
+ - - ">="
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  type: :development
@@ -168,7 +168,7 @@ dependencies:
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
171
- - - ! '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  - !ruby/object:Gem::Dependency
@@ -176,7 +176,7 @@ dependencies:
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
- - - ! '>='
179
+ - - ">="
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  type: :development
@@ -184,7 +184,7 @@ dependencies:
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
187
- - - ! '>='
187
+ - - ">="
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  description: Use solrizer to populate solr indexes. You can run solrizer from within
@@ -198,7 +198,7 @@ extra_rdoc_files:
198
198
  - LICENSE
199
199
  - README.textile
200
200
  files:
201
- - .gitignore
201
+ - ".gitignore"
202
202
  - Gemfile
203
203
  - History.txt
204
204
  - LICENSE
@@ -248,18 +248,21 @@ require_paths:
248
248
  required_ruby_version: !ruby/object:Gem::Requirement
249
249
  none: false
250
250
  requirements:
251
- - - ! '>='
251
+ - - ">="
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
+ segments:
255
+ - 0
256
+ hash: 101922245863282176
254
257
  required_rubygems_version: !ruby/object:Gem::Requirement
255
258
  none: false
256
259
  requirements:
257
- - - ! '>'
260
+ - - ">"
258
261
  - !ruby/object:Gem::Version
259
262
  version: 1.3.1
260
263
  requirements: []
261
264
  rubyforge_project:
262
- rubygems_version: 1.8.24
265
+ rubygems_version: 1.8.25
263
266
  signing_key:
264
267
  specification_version: 3
265
268
  summary: A utility for building solr indexes, usually from Fedora repository content