erichummel-sunspot 1.2.1 → 2.0.0.pre.111215

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/.gitignore +0 -1
  2. data/Gemfile +2 -1
  3. data/History.txt +30 -0
  4. data/Rakefile +5 -9
  5. data/lib/sunspot.rb +13 -3
  6. data/lib/sunspot/batcher.rb +62 -0
  7. data/lib/sunspot/class_set.rb +23 -0
  8. data/lib/sunspot/configuration.rb +7 -0
  9. data/lib/sunspot/dsl.rb +1 -1
  10. data/lib/sunspot/dsl/field_group.rb +57 -0
  11. data/lib/sunspot/dsl/field_query.rb +48 -0
  12. data/lib/sunspot/dsl/function.rb +13 -0
  13. data/lib/sunspot/dsl/paginatable.rb +5 -1
  14. data/lib/sunspot/dsl/restriction_with_near.rb +39 -0
  15. data/lib/sunspot/dsl/scope.rb +4 -4
  16. data/lib/sunspot/dsl/search.rb +2 -2
  17. data/lib/sunspot/dsl/standard_query.rb +2 -0
  18. data/lib/sunspot/indexer.rb +12 -7
  19. data/lib/sunspot/query.rb +3 -3
  20. data/lib/sunspot/query/bbox.rb +15 -0
  21. data/lib/sunspot/query/common_query.rb +13 -2
  22. data/lib/sunspot/query/dismax.rb +5 -1
  23. data/lib/sunspot/query/field_group.rb +36 -0
  24. data/lib/sunspot/query/geofilt.rb +16 -0
  25. data/lib/sunspot/query/highlighting.rb +8 -1
  26. data/lib/sunspot/query/pagination.rb +8 -4
  27. data/lib/sunspot/query/sort.rb +14 -0
  28. data/lib/sunspot/query/sort_composite.rb +3 -2
  29. data/lib/sunspot/search.rb +1 -1
  30. data/lib/sunspot/search/abstract_search.rb +53 -65
  31. data/lib/sunspot/search/field_group.rb +32 -0
  32. data/lib/sunspot/search/group.rb +50 -0
  33. data/lib/sunspot/search/hit.rb +21 -7
  34. data/lib/sunspot/search/hit_enumerable.rb +72 -0
  35. data/lib/sunspot/search/paginated_collection.rb +5 -3
  36. data/lib/sunspot/session.rb +3 -1
  37. data/lib/sunspot/type.rb +21 -0
  38. data/lib/sunspot/util.rb +9 -0
  39. data/lib/sunspot/version.rb +1 -1
  40. data/spec/api/batcher_spec.rb +112 -0
  41. data/spec/api/class_set_spec.rb +24 -0
  42. data/spec/api/hit_enumerable_spec.rb +47 -0
  43. data/spec/api/indexer/batch_spec.rb +29 -3
  44. data/spec/api/query/function_spec.rb +9 -0
  45. data/spec/api/query/group_spec.rb +32 -0
  46. data/spec/api/query/highlighting_examples.rb +22 -0
  47. data/spec/api/query/ordering_pagination_examples.rb +21 -0
  48. data/spec/api/query/spatial_examples.rb +27 -0
  49. data/spec/api/query/standard_spec.rb +1 -0
  50. data/spec/api/search/hits_spec.rb +11 -0
  51. data/spec/api/search/paginated_collection_spec.rb +10 -0
  52. data/spec/api/search/results_spec.rb +6 -0
  53. data/spec/api/session_proxy/thread_local_session_proxy_spec.rb +0 -11
  54. data/spec/api/session_spec.rb +12 -0
  55. data/spec/api/sunspot_spec.rb +11 -0
  56. data/spec/helpers/indexer_helper.rb +0 -12
  57. data/spec/helpers/integration_helper.rb +8 -0
  58. data/spec/helpers/mock_session_helper.rb +13 -0
  59. data/spec/helpers/query_helper.rb +0 -12
  60. data/spec/helpers/search_helper.rb +0 -12
  61. data/spec/integration/dynamic_fields_spec.rb +2 -0
  62. data/spec/integration/faceting_spec.rb +14 -1
  63. data/spec/integration/field_grouping_spec.rb +66 -0
  64. data/spec/integration/geospatial_spec.rb +85 -0
  65. data/spec/integration/highlighting_spec.rb +22 -0
  66. data/spec/integration/indexing_spec.rb +23 -1
  67. data/spec/integration/keyword_search_spec.rb +1 -1
  68. data/spec/integration/local_search_spec.rb +1 -1
  69. data/spec/integration/more_like_this_spec.rb +1 -1
  70. data/spec/integration/scoped_search_spec.rb +1 -1
  71. data/spec/integration/stored_fields_spec.rb +2 -0
  72. data/spec/integration/test_pagination.rb +13 -2
  73. data/spec/integration/unicode_spec.rb +15 -0
  74. data/spec/mocks/connection.rb +4 -4
  75. data/spec/mocks/post.rb +1 -0
  76. data/spec/spec_helper.rb +21 -11
  77. data/sunspot.gemspec +42 -0
  78. data/tasks/rdoc.rake +2 -2
  79. metadata +95 -135
  80. data/VERSION.yml +0 -4
  81. data/bin/sunspot-installer +0 -19
  82. data/bin/sunspot-solr +0 -74
  83. data/installer/config/schema.yml +0 -95
  84. data/lib/sunspot/installer.rb +0 -31
  85. data/lib/sunspot/installer/library_installer.rb +0 -45
  86. data/lib/sunspot/installer/schema_builder.rb +0 -219
  87. data/lib/sunspot/installer/solrconfig_updater.rb +0 -76
  88. data/lib/sunspot/installer/task_helper.rb +0 -18
  89. data/lib/sunspot/server.rb +0 -152
  90. data/solr-1.3/etc/jetty.xml +0 -212
  91. data/solr-1.3/etc/webdefault.xml +0 -379
  92. data/solr-1.3/lib/jetty-6.1.3.jar +0 -0
  93. data/solr-1.3/lib/jetty-util-6.1.3.jar +0 -0
  94. data/solr-1.3/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  95. data/solr-1.3/lib/jsp-2.1/core-3.1.1.jar +0 -0
  96. data/solr-1.3/lib/jsp-2.1/jsp-2.1.jar +0 -0
  97. data/solr-1.3/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  98. data/solr-1.3/lib/servlet-api-2.5-6.1.3.jar +0 -0
  99. data/solr-1.3/solr/conf/elevate.xml +0 -36
  100. data/solr-1.3/solr/conf/protwords.txt +0 -21
  101. data/solr-1.3/solr/conf/schema.xml +0 -64
  102. data/solr-1.3/solr/conf/solrconfig.xml +0 -725
  103. data/solr-1.3/solr/conf/stopwords.txt +0 -57
  104. data/solr-1.3/solr/conf/synonyms.txt +0 -31
  105. data/solr-1.3/solr/lib/geoapi-nogenerics-2.1-M2.jar +0 -0
  106. data/solr-1.3/solr/lib/gt2-referencing-2.3.1.jar +0 -0
  107. data/solr-1.3/solr/lib/jsr108-0.01.jar +0 -0
  108. data/solr-1.3/solr/lib/locallucene.jar +0 -0
  109. data/solr-1.3/solr/lib/localsolr.jar +0 -0
  110. data/solr-1.3/start.jar +0 -0
  111. data/solr-1.3/webapps/solr.war +0 -0
  112. data/solr/README.txt +0 -42
  113. data/solr/etc/jetty.xml +0 -218
  114. data/solr/etc/webdefault.xml +0 -379
  115. data/solr/lib/jetty-6.1.3.jar +0 -0
  116. data/solr/lib/jetty-util-6.1.3.jar +0 -0
  117. data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  118. data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  119. data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  120. data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  121. data/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
  122. data/solr/solr/.gitignore +0 -1
  123. data/solr/solr/README.txt +0 -54
  124. data/solr/solr/conf/admin-extra.html +0 -31
  125. data/solr/solr/conf/elevate.xml +0 -36
  126. data/solr/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  127. data/solr/solr/conf/protwords.txt +0 -21
  128. data/solr/solr/conf/schema.xml +0 -238
  129. data/solr/solr/conf/scripts.conf +0 -24
  130. data/solr/solr/conf/solrconfig.xml +0 -934
  131. data/solr/solr/conf/spellings.txt +0 -2
  132. data/solr/solr/conf/stopwords.txt +0 -58
  133. data/solr/solr/conf/synonyms.txt +0 -31
  134. data/solr/solr/conf/xslt/example.xsl +0 -132
  135. data/solr/solr/conf/xslt/example_atom.xsl +0 -67
  136. data/solr/solr/conf/xslt/example_rss.xsl +0 -66
  137. data/solr/solr/conf/xslt/luke.xsl +0 -337
  138. data/solr/start.jar +0 -0
  139. data/solr/webapps/solr.war +0 -0
  140. data/spec/api/server_spec.rb +0 -91
  141. data/spec/integration/spec_helper.rb +0 -7
@@ -0,0 +1,85 @@
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
+
3
+ describe "geospatial search" do
4
+ describe "filtering by radius" do
5
+ before :all do
6
+ Sunspot.remove_all
7
+
8
+ @post = Post.new(:title => "Howdy",
9
+ :coordinates => Sunspot::Util::Coordinates.new(32, -68))
10
+ Sunspot.index!(@post)
11
+ end
12
+
13
+ it "matches posts within the radius" do
14
+ results = Sunspot.search(Post) {
15
+ with(:coordinates_new).in_radius(32, -68, 1)
16
+ }.results
17
+
18
+ results.should include(@post)
19
+ end
20
+
21
+ it "filters out posts not in the radius" do
22
+ results = Sunspot.search(Post) {
23
+ with(:coordinates_new).in_radius(33, -68, 1)
24
+ }.results
25
+
26
+ results.should_not include(@post)
27
+ end
28
+ end
29
+
30
+ describe "filtering by bounding box" do
31
+ before :all do
32
+ Sunspot.remove_all
33
+
34
+ @post = Post.new(:title => "Howdy",
35
+ :coordinates => Sunspot::Util::Coordinates.new(32, -68))
36
+ Sunspot.index!(@post)
37
+ end
38
+
39
+ it "matches post within the bounding box" do
40
+ results = Sunspot.search(Post) {
41
+ with(:coordinates_new).in_bounding_box [31, -69], [33, -67]
42
+ }.results
43
+
44
+ results.should include(@post)
45
+ end
46
+
47
+ it "filters out posts not in the bounding box" do
48
+ results = Sunspot.search(Post) {
49
+ with(:coordinates_new).in_bounding_box [20, -70], [21, -69]
50
+ }.results
51
+
52
+ results.should_not include(@post)
53
+ end
54
+ end
55
+
56
+ describe "ordering by geodist" do
57
+ before :all do
58
+ Sunspot.remove_all
59
+
60
+ @posts = [
61
+ Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(34, -68)),
62
+ Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(33, -68)),
63
+ Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(32, -68))
64
+ ]
65
+
66
+ Sunspot.index!(@posts)
67
+ end
68
+
69
+ it "orders posts by distance ascending" do
70
+ results = Sunspot.search(Post) {
71
+ order_by_geodist(:coordinates_new, 32, -68)
72
+ }.results
73
+
74
+ results.should == @posts.reverse
75
+ end
76
+
77
+ it "orders posts by distance descending" do
78
+ results = Sunspot.search(Post) {
79
+ order_by_geodist(:coordinates_new, 32, -68, :desc)
80
+ }.results
81
+
82
+ results.should == @posts
83
+ end
84
+ end
85
+ end
@@ -1,8 +1,11 @@
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
+
1
3
  describe 'keyword highlighting' do
2
4
  before :all do
3
5
  @posts = []
4
6
  @posts << Post.new(:body => 'And the fox laughed')
5
7
  @posts << Post.new(:body => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit', :blog_id => 1)
8
+ @posts << Post.new(:body => 'Lorem ipsum dolor sit amet', :title => 'consectetur adipiscing elit', :blog_id => 1)
6
9
  Sunspot.index!(*@posts)
7
10
  @search_result = Sunspot.search(Post) { keywords 'fox', :highlight => true }
8
11
  end
@@ -19,4 +22,23 @@ describe 'keyword highlighting' do
19
22
  search_result = Sunspot.search(Post){ with :blog_id, 1 }
20
23
  search_result.hits.first.highlights.should be_empty
21
24
  end
25
+
26
+ it "should process multiple keyword request on different fields with highlights correctly" do
27
+ search_results = nil
28
+ lambda do
29
+ search_results = Sunspot.search(Post) do
30
+ keywords 'Lorem ipsum', :fields => [:body] do
31
+ highlight :body
32
+ end
33
+ keywords 'consectetur', :fields => [:title] do
34
+ highlight :title
35
+ end
36
+ end
37
+ end.should_not raise_error(RSolr::Error::Http)
38
+ search_results.results.length.should eq(1)
39
+ search_results.results.first.should eq(@posts.last)
40
+ # this one might be a Solr bug, therefore not related to Sunspot itself
41
+ # search_results.hits.first.highlights.should_not be_empty
42
+ end
43
+
22
44
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'indexing' do
4
4
  it 'should index non-multivalued field with newlines' do
@@ -30,4 +30,26 @@ describe 'indexing' do
30
30
  end
31
31
  Sunspot.search(Post).should have(2).results
32
32
  end
33
+
34
+
35
+ describe "in batches" do
36
+ let(:post_1) { Post.new :title => 'A tittle' }
37
+ let(:post_2) { Post.new :title => 'Another title' }
38
+
39
+ describe "nested" do
40
+ let(:a_nested_batch) do
41
+ Sunspot.batch do
42
+ Sunspot.index post_1
43
+
44
+ Sunspot.batch do
45
+ Sunspot.index post_2
46
+ end
47
+ end
48
+ end
49
+
50
+ it "does not fail" do
51
+ expect { a_nested_batch }.to_not raise_error
52
+ end
53
+ end
54
+ end
33
55
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'keyword search' do
4
4
  describe 'generally' do
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'local search' do
4
4
  ORIGIN = [40.7246062, -73.9969018]
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'more_like_this' do
4
4
  before :all do
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'scoped_search' do
4
4
  def self.test_field_type(name, attribute, field, *values)
@@ -1,3 +1,5 @@
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
+
1
3
  describe 'stored fields' do
2
4
  before :all do
3
5
  Sunspot.remove_all
@@ -1,4 +1,4 @@
1
- require File.expand_path('spec_helper', File.dirname(__FILE__))
1
+ require File.expand_path('../spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe 'pagination' do
4
4
  before :all do
@@ -6,7 +6,7 @@ describe 'pagination' do
6
6
  @posts = (0..19).map do |i|
7
7
  Post.new(:blog_id => i)
8
8
  end
9
- Sunspot.index(*@posts)
9
+ Sunspot.index!(*@posts)
10
10
  end
11
11
 
12
12
  it 'should return all by default' do
@@ -29,4 +29,15 @@ describe 'pagination' do
29
29
  end.results
30
30
  results.should == @posts[10,10]
31
31
  end
32
+
33
+ it 'should return pages with offsets' do
34
+ results = Sunspot.search(Post) do
35
+ order_by :blog_id
36
+ paginate :page => 2, :per_page => 5, :offset => 3
37
+ end.results
38
+
39
+ # page 1 is 3, 4, 5, 6, 7
40
+ # page 2 is 8, 9, 10, 11, 12
41
+ results.should == @posts[8,5]
42
+ end
32
43
  end
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ require File.expand_path("../spec_helper", File.dirname(__FILE__))
3
+
4
+ describe "unicode characters" do
5
+ before :each do
6
+ Sunspot.remove_all
7
+
8
+ @post = Post.new(:title => "Híghgrøøvé")
9
+ Sunspot.index!(@post)
10
+ end
11
+
12
+ it "correctly retrieves the string as UTF-8" do
13
+ Sunspot.search(Post).hits.first.stored(:title).should == "Híghgrøøvé"
14
+ end
15
+ end
@@ -54,16 +54,16 @@ module Mock
54
54
  @optims << Time.now
55
55
  end
56
56
 
57
- def request(path, params, args = {})
58
- unless path == "/#{@expected_handler}"
57
+ def post(path, params)
58
+ unless path == "#{@expected_handler}"
59
59
  raise ArgumentError, "Expected request to #{@expected_handler} request handler"
60
60
  end
61
- @searches << @last_search = params
61
+ @searches << @last_search = params[:data]
62
62
  @response || {}
63
63
  end
64
64
 
65
65
  def method_missing(method, *args, &block)
66
- request("/#{method}", *args)
66
+ get("#{method}", *args)
67
67
  end
68
68
 
69
69
  def has_add_with?(*documents)
@@ -54,6 +54,7 @@ Sunspot.setup(Post) do
54
54
  Time.now
55
55
  end
56
56
  location :coordinates
57
+ latlon(:coordinates_new) { coordinates }
57
58
 
58
59
  dynamic_string :custom_string, :stored => true
59
60
  dynamic_float :custom_float, :multiple => true, :using => :custom_fl
@@ -1,6 +1,4 @@
1
1
  # encoding: utf-8
2
- require 'rubygems'
3
- require 'bundler/setup'
4
2
 
5
3
  require 'ostruct'
6
4
  require 'sunspot'
@@ -9,17 +7,29 @@ require File.join(File.dirname(__FILE__), 'mocks', 'mock_record.rb')
9
7
  Dir.glob(File.join(File.dirname(__FILE__), 'mocks', '**', '*.rb')).each do |file|
10
8
  require file unless File.basename(file) == 'mock_record.rb'
11
9
  end
10
+ Dir.glob(File.join(File.dirname(__FILE__), "helpers", "*.rb")).each do |file|
11
+ require file
12
+ end
12
13
  require File.join(File.dirname(__FILE__), 'ext')
13
14
 
14
- Spec::Runner.configure do |config|
15
- Dir.glob(File.join(File.dirname(__FILE__), 'helpers', '*_helper.rb')).each do |helper|
16
- helper_name = File.basename(helper, File.extname(helper))
17
- spec_type = helper_name.sub(/_helper$/, '').to_sym
18
- require(helper)
19
- config.include(
20
- Sunspot::Util.full_const_get(Sunspot::Util.camel_case(helper_name)),
21
- :type => spec_type
22
- )
15
+ RSpec.configure do |config|
16
+ # Mock session available to all spec/api tests
17
+ config.include MockSessionHelper,
18
+ :type => :api,
19
+ :example_group => {:file_path => /spec[\\\/]api/}
20
+
21
+ # Real Solr instance is available to integration tests
22
+ config.include IntegrationHelper,
23
+ :type => :integration,
24
+ :example_group => {:file_path => /spec[\\\/]integration/}
25
+
26
+ # Nested under spec/api
27
+ [:indexer, :query, :search].each do |spec_type|
28
+ helper_name = "#{spec_type}_helper"
29
+
30
+ config.include Sunspot::Util.full_const_get(Sunspot::Util.camel_case(helper_name)),
31
+ :type => spec_type,
32
+ :example_group => {:file_path => /spec[\\\/]api[\\\/]#{spec_type}/}
23
33
  end
24
34
  end
25
35
 
@@ -0,0 +1,42 @@
1
+ # encoding: utf-8
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "sunspot/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.version = Sunspot::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ['Mat Brown', 'Peer Allan', 'Dmitriy Dzema', 'Benjamin Krause', 'Marcel de Graaf', 'Brandon Keepers', 'Peter Berkenbosch',
9
+ 'Brian Atkinson', 'Tom Coleman', 'Matt Mitchell', 'Nathan Beyer', 'Kieran Topping', 'Nicolas Braem', 'Jeremy Ashkenas',
10
+ 'Dylan Vaughn', 'Brian Durand', 'Sam Granieri', 'Nick Zadrozny', 'Jason Ronallo']
11
+
12
+ s.name = 'erichummel-sunspot'
13
+ s.version = Sunspot::VERSION
14
+ s.executables = ['sunspot-solr', 'sunspot-installer']
15
+ s.email = 'mat@patch.com'
16
+ s.homepage = 'http://outoftime.github.com/sunspot'
17
+
18
+ s.summary = 'Library for expressive, powerful interaction with the Solr search engine'
19
+ s.description = <<-TEXT
20
+ Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent
21
+ Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations
22
+ can be performed without hand-writing any boolean queries or building Solr parameters by hand.
23
+ TEXT
24
+
25
+ s.rubyforge_project = "sunspot"
26
+
27
+ s.files = `git ls-files`.split("\n")
28
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
30
+ s.require_paths = ["lib"]
31
+
32
+ s.add_dependency 'rsolr', '~>1.0.6'
33
+ s.add_dependency 'escape', '~>0.0.4'
34
+ s.add_dependency 'pr_geohash', '~>1.0'
35
+
36
+ s.add_development_dependency 'rspec', '~>2.6.0'
37
+ s.add_development_dependency 'hanna'
38
+
39
+ s.rdoc_options << '--webcvs=http://github.com/outoftime/sunspot/tree/master/%s' <<
40
+ '--title' << 'Sunspot - Solr-powered search for Ruby objects - API Documentation' <<
41
+ '--main' << 'README.rdoc'
42
+ end
@@ -10,8 +10,8 @@ end
10
10
  Rake::RDocTask.new(:doc) do |rdoc|
11
11
  version = Sunspot::VERSION
12
12
  rdoc.title = "Sunspot #{version} - Solr-powered search for Ruby objects - API Documentation"
13
- rdoc.main = 'README.rdoc'
14
- rdoc.rdoc_files.include('README.rdoc', 'lib/sunspot.rb', 'lib/sunspot/**/*.rb')
13
+ rdoc.main = 'README.md'
14
+ rdoc.rdoc_files.include('README.md', 'lib/sunspot.rb', 'lib/sunspot/**/*.rb')
15
15
  rdoc.rdoc_dir = 'doc'
16
16
  rdoc.options << "--webcvs=http://github.com/outoftime/sunspot/tree/v#{version}/%s" << '--title' << 'Sunspot - Solr-powered search for Ruby objects - API Documentation'
17
17
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: erichummel-sunspot
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.2.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0.pre.111215
5
+ prerelease: 6
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Mat Brown
9
9
  - Peer Allan
10
10
  - Dmitriy Dzema
@@ -27,93 +27,90 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
-
31
- date: 2011-08-17 00:00:00 Z
32
- dependencies:
33
- - !ruby/object:Gem::Dependency
30
+ date: 2012-03-12 00:00:00.000000000Z
31
+ dependencies:
32
+ - !ruby/object:Gem::Dependency
34
33
  name: rsolr
35
- prerelease: false
36
- requirement: &id001 !ruby/object:Gem::Requirement
34
+ requirement: &2159132400 !ruby/object:Gem::Requirement
37
35
  none: false
38
- requirements:
39
- - - "="
40
- - !ruby/object:Gem::Version
41
- version: 0.12.1
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: 1.0.6
42
40
  type: :runtime
43
- version_requirements: *id001
44
- - !ruby/object:Gem::Dependency
45
- name: escape
46
41
  prerelease: false
47
- requirement: &id002 !ruby/object:Gem::Requirement
42
+ version_requirements: *2159132400
43
+ - !ruby/object:Gem::Dependency
44
+ name: escape
45
+ requirement: &2159131540 !ruby/object:Gem::Requirement
48
46
  none: false
49
- requirements:
50
- - - "="
51
- - !ruby/object:Gem::Version
47
+ requirements:
48
+ - - ~>
49
+ - !ruby/object:Gem::Version
52
50
  version: 0.0.4
53
51
  type: :runtime
54
- version_requirements: *id002
55
- - !ruby/object:Gem::Dependency
56
- name: pr_geohash
57
52
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
53
+ version_requirements: *2159131540
54
+ - !ruby/object:Gem::Dependency
55
+ name: pr_geohash
56
+ requirement: &2159130760 !ruby/object:Gem::Requirement
59
57
  none: false
60
- requirements:
58
+ requirements:
61
59
  - - ~>
62
- - !ruby/object:Gem::Version
63
- version: "1.0"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
64
62
  type: :runtime
65
- version_requirements: *id003
66
- - !ruby/object:Gem::Dependency
67
- name: rspec
68
63
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
64
+ version_requirements: *2159130760
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec
67
+ requirement: &2159130240 !ruby/object:Gem::Requirement
70
68
  none: false
71
- requirements:
69
+ requirements:
72
70
  - - ~>
73
- - !ruby/object:Gem::Version
74
- version: "1.1"
71
+ - !ruby/object:Gem::Version
72
+ version: 2.6.0
75
73
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: hanna
79
74
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
75
+ version_requirements: *2159130240
76
+ - !ruby/object:Gem::Dependency
77
+ name: hanna
78
+ requirement: &2159129760 !ruby/object:Gem::Requirement
81
79
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: "0"
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
86
84
  type: :development
87
- version_requirements: *id005
88
- description: " Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent\n Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations\n can be performed without hand-writing any boolean queries or building Solr parameters by hand.\n"
89
- email:
90
- - mat@patch.com
91
- executables:
92
- - sunspot-solr
93
- - sunspot-installer
85
+ prerelease: false
86
+ version_requirements: *2159129760
87
+ description: ! " Sunspot is a library providing a powerful, all-ruby API for the
88
+ Solr search engine. Sunspot manages the configuration of persistent\n Ruby classes
89
+ for search and indexing and exposes Solr's most powerful features through a collection
90
+ of DSLs. Complex search operations\n can be performed without hand-writing any
91
+ boolean queries or building Solr parameters by hand.\n"
92
+ email: mat@patch.com
93
+ executables: []
94
94
  extensions: []
95
-
96
95
  extra_rdoc_files: []
97
-
98
- files:
96
+ files:
99
97
  - .gitignore
100
98
  - Gemfile
101
99
  - History.txt
102
100
  - LICENSE
103
101
  - Rakefile
104
102
  - TODO
105
- - VERSION.yml
106
- - bin/sunspot-installer
107
- - bin/sunspot-solr
108
- - installer/config/schema.yml
109
103
  - lib/light_config.rb
110
104
  - lib/sunspot.rb
111
105
  - lib/sunspot/adapters.rb
106
+ - lib/sunspot/batcher.rb
107
+ - lib/sunspot/class_set.rb
112
108
  - lib/sunspot/composite_setup.rb
113
109
  - lib/sunspot/configuration.rb
114
110
  - lib/sunspot/data_extractor.rb
115
111
  - lib/sunspot/dsl.rb
116
112
  - lib/sunspot/dsl/adjustable.rb
113
+ - lib/sunspot/dsl/field_group.rb
117
114
  - lib/sunspot/dsl/field_query.rb
118
115
  - lib/sunspot/dsl/fields.rb
119
116
  - lib/sunspot/dsl/fulltext.rb
@@ -130,13 +127,9 @@ files:
130
127
  - lib/sunspot/field.rb
131
128
  - lib/sunspot/field_factory.rb
132
129
  - lib/sunspot/indexer.rb
133
- - lib/sunspot/installer.rb
134
- - lib/sunspot/installer/library_installer.rb
135
- - lib/sunspot/installer/schema_builder.rb
136
- - lib/sunspot/installer/solrconfig_updater.rb
137
- - lib/sunspot/installer/task_helper.rb
138
130
  - lib/sunspot/query.rb
139
131
  - lib/sunspot/query/abstract_field_facet.rb
132
+ - lib/sunspot/query/bbox.rb
140
133
  - lib/sunspot/query/boost_query.rb
141
134
  - lib/sunspot/query/common_query.rb
142
135
  - lib/sunspot/query/composite_fulltext.rb
@@ -144,9 +137,11 @@ files:
144
137
  - lib/sunspot/query/date_field_facet.rb
145
138
  - lib/sunspot/query/dismax.rb
146
139
  - lib/sunspot/query/field_facet.rb
140
+ - lib/sunspot/query/field_group.rb
147
141
  - lib/sunspot/query/filter.rb
148
142
  - lib/sunspot/query/function_query.rb
149
143
  - lib/sunspot/query/geo.rb
144
+ - lib/sunspot/query/geofilt.rb
150
145
  - lib/sunspot/query/highlighting.rb
151
146
  - lib/sunspot/query/more_like_this.rb
152
147
  - lib/sunspot/query/more_like_this_query.rb
@@ -164,13 +159,15 @@ files:
164
159
  - lib/sunspot/search/date_facet.rb
165
160
  - lib/sunspot/search/facet_row.rb
166
161
  - lib/sunspot/search/field_facet.rb
162
+ - lib/sunspot/search/field_group.rb
163
+ - lib/sunspot/search/group.rb
167
164
  - lib/sunspot/search/highlight.rb
168
165
  - lib/sunspot/search/hit.rb
166
+ - lib/sunspot/search/hit_enumerable.rb
169
167
  - lib/sunspot/search/more_like_this_search.rb
170
168
  - lib/sunspot/search/paginated_collection.rb
171
169
  - lib/sunspot/search/query_facet.rb
172
170
  - lib/sunspot/search/standard_search.rb
173
- - lib/sunspot/server.rb
174
171
  - lib/sunspot/session.rb
175
172
  - lib/sunspot/session_proxy.rb
176
173
  - lib/sunspot/session_proxy/abstract_session_proxy.rb
@@ -188,59 +185,11 @@ files:
188
185
  - log/.gitignore
189
186
  - pkg/.gitignore
190
187
  - script/console
191
- - solr-1.3/etc/jetty.xml
192
- - solr-1.3/etc/webdefault.xml
193
- - solr-1.3/lib/jetty-6.1.3.jar
194
- - solr-1.3/lib/jetty-util-6.1.3.jar
195
- - solr-1.3/lib/jsp-2.1/ant-1.6.5.jar
196
- - solr-1.3/lib/jsp-2.1/core-3.1.1.jar
197
- - solr-1.3/lib/jsp-2.1/jsp-2.1.jar
198
- - solr-1.3/lib/jsp-2.1/jsp-api-2.1.jar
199
- - solr-1.3/lib/servlet-api-2.5-6.1.3.jar
200
- - solr-1.3/solr/conf/elevate.xml
201
- - solr-1.3/solr/conf/protwords.txt
202
- - solr-1.3/solr/conf/schema.xml
203
- - solr-1.3/solr/conf/solrconfig.xml
204
- - solr-1.3/solr/conf/stopwords.txt
205
- - solr-1.3/solr/conf/synonyms.txt
206
- - solr-1.3/solr/lib/geoapi-nogenerics-2.1-M2.jar
207
- - solr-1.3/solr/lib/gt2-referencing-2.3.1.jar
208
- - solr-1.3/solr/lib/jsr108-0.01.jar
209
- - solr-1.3/solr/lib/locallucene.jar
210
- - solr-1.3/solr/lib/localsolr.jar
211
- - solr-1.3/start.jar
212
- - solr-1.3/webapps/solr.war
213
- - solr/README.txt
214
- - solr/etc/jetty.xml
215
- - solr/etc/webdefault.xml
216
- - solr/lib/jetty-6.1.3.jar
217
- - solr/lib/jetty-util-6.1.3.jar
218
- - solr/lib/jsp-2.1/ant-1.6.5.jar
219
- - solr/lib/jsp-2.1/core-3.1.1.jar
220
- - solr/lib/jsp-2.1/jsp-2.1.jar
221
- - solr/lib/jsp-2.1/jsp-api-2.1.jar
222
- - solr/lib/servlet-api-2.5-6.1.3.jar
223
- - solr/logs/.gitignore
224
- - solr/solr/.gitignore
225
- - solr/solr/README.txt
226
- - solr/solr/conf/admin-extra.html
227
- - solr/solr/conf/elevate.xml
228
- - solr/solr/conf/mapping-ISOLatin1Accent.txt
229
- - solr/solr/conf/protwords.txt
230
- - solr/solr/conf/schema.xml
231
- - solr/solr/conf/scripts.conf
232
- - solr/solr/conf/solrconfig.xml
233
- - solr/solr/conf/spellings.txt
234
- - solr/solr/conf/stopwords.txt
235
- - solr/solr/conf/synonyms.txt
236
- - solr/solr/conf/xslt/example.xsl
237
- - solr/solr/conf/xslt/example_atom.xsl
238
- - solr/solr/conf/xslt/example_rss.xsl
239
- - solr/solr/conf/xslt/luke.xsl
240
- - solr/start.jar
241
- - solr/webapps/solr.war
242
188
  - spec/api/adapters_spec.rb
189
+ - spec/api/batcher_spec.rb
243
190
  - spec/api/binding_spec.rb
191
+ - spec/api/class_set_spec.rb
192
+ - spec/api/hit_enumerable_spec.rb
244
193
  - spec/api/indexer/attributes_spec.rb
245
194
  - spec/api/indexer/batch_spec.rb
246
195
  - spec/api/indexer/dynamic_fields_spec.rb
@@ -257,10 +206,12 @@ files:
257
206
  - spec/api/query/fulltext_examples.rb
258
207
  - spec/api/query/function_spec.rb
259
208
  - spec/api/query/geo_examples.rb
209
+ - spec/api/query/group_spec.rb
260
210
  - spec/api/query/highlighting_examples.rb
261
211
  - spec/api/query/more_like_this_spec.rb
262
212
  - spec/api/query/ordering_pagination_examples.rb
263
213
  - spec/api/query/scope_examples.rb
214
+ - spec/api/query/spatial_examples.rb
264
215
  - spec/api/query/spec_helper.rb
265
216
  - spec/api/query/standard_spec.rb
266
217
  - spec/api/query/text_field_scoping_examples.rb
@@ -273,7 +224,6 @@ files:
273
224
  - spec/api/search/results_spec.rb
274
225
  - spec/api/search/search_spec.rb
275
226
  - spec/api/search/spec_helper.rb
276
- - spec/api/server_spec.rb
277
227
  - spec/api/session_proxy/class_sharding_session_proxy_spec.rb
278
228
  - spec/api/session_proxy/id_sharding_session_proxy_spec.rb
279
229
  - spec/api/session_proxy/master_slave_session_proxy_spec.rb
@@ -286,19 +236,23 @@ files:
286
236
  - spec/api/sunspot_spec.rb
287
237
  - spec/ext.rb
288
238
  - spec/helpers/indexer_helper.rb
239
+ - spec/helpers/integration_helper.rb
240
+ - spec/helpers/mock_session_helper.rb
289
241
  - spec/helpers/query_helper.rb
290
242
  - spec/helpers/search_helper.rb
291
243
  - spec/integration/dynamic_fields_spec.rb
292
244
  - spec/integration/faceting_spec.rb
245
+ - spec/integration/field_grouping_spec.rb
246
+ - spec/integration/geospatial_spec.rb
293
247
  - spec/integration/highlighting_spec.rb
294
248
  - spec/integration/indexing_spec.rb
295
249
  - spec/integration/keyword_search_spec.rb
296
250
  - spec/integration/local_search_spec.rb
297
251
  - spec/integration/more_like_this_spec.rb
298
252
  - spec/integration/scoped_search_spec.rb
299
- - spec/integration/spec_helper.rb
300
253
  - spec/integration/stored_fields_spec.rb
301
254
  - spec/integration/test_pagination.rb
255
+ - spec/integration/unicode_spec.rb
302
256
  - spec/mocks/adapters.rb
303
257
  - spec/mocks/blog.rb
304
258
  - spec/mocks/comment.rb
@@ -318,38 +272,39 @@ files:
318
272
  - tasks/todo.rake
319
273
  homepage: http://outoftime.github.com/sunspot
320
274
  licenses: []
321
-
322
275
  post_install_message:
323
- rdoc_options:
276
+ rdoc_options:
324
277
  - --webcvs=http://github.com/outoftime/sunspot/tree/master/%s
325
278
  - --title
326
279
  - Sunspot - Solr-powered search for Ruby objects - API Documentation
327
280
  - --main
328
281
  - README.rdoc
329
- require_paths:
282
+ require_paths:
330
283
  - lib
331
- required_ruby_version: !ruby/object:Gem::Requirement
284
+ required_ruby_version: !ruby/object:Gem::Requirement
332
285
  none: false
333
- requirements:
334
- - - ">="
335
- - !ruby/object:Gem::Version
336
- version: "0"
337
- required_rubygems_version: !ruby/object:Gem::Requirement
286
+ requirements:
287
+ - - ! '>='
288
+ - !ruby/object:Gem::Version
289
+ version: '0'
290
+ required_rubygems_version: !ruby/object:Gem::Requirement
338
291
  none: false
339
- requirements:
340
- - - ">="
341
- - !ruby/object:Gem::Version
342
- version: "0"
292
+ requirements:
293
+ - - ! '>'
294
+ - !ruby/object:Gem::Version
295
+ version: 1.3.1
343
296
  requirements: []
344
-
345
297
  rubyforge_project: sunspot
346
- rubygems_version: 1.8.8
298
+ rubygems_version: 1.8.10
347
299
  signing_key:
348
300
  specification_version: 3
349
301
  summary: Library for expressive, powerful interaction with the Solr search engine
350
- test_files:
302
+ test_files:
351
303
  - spec/api/adapters_spec.rb
304
+ - spec/api/batcher_spec.rb
352
305
  - spec/api/binding_spec.rb
306
+ - spec/api/class_set_spec.rb
307
+ - spec/api/hit_enumerable_spec.rb
353
308
  - spec/api/indexer/attributes_spec.rb
354
309
  - spec/api/indexer/batch_spec.rb
355
310
  - spec/api/indexer/dynamic_fields_spec.rb
@@ -366,10 +321,12 @@ test_files:
366
321
  - spec/api/query/fulltext_examples.rb
367
322
  - spec/api/query/function_spec.rb
368
323
  - spec/api/query/geo_examples.rb
324
+ - spec/api/query/group_spec.rb
369
325
  - spec/api/query/highlighting_examples.rb
370
326
  - spec/api/query/more_like_this_spec.rb
371
327
  - spec/api/query/ordering_pagination_examples.rb
372
328
  - spec/api/query/scope_examples.rb
329
+ - spec/api/query/spatial_examples.rb
373
330
  - spec/api/query/spec_helper.rb
374
331
  - spec/api/query/standard_spec.rb
375
332
  - spec/api/query/text_field_scoping_examples.rb
@@ -382,7 +339,6 @@ test_files:
382
339
  - spec/api/search/results_spec.rb
383
340
  - spec/api/search/search_spec.rb
384
341
  - spec/api/search/spec_helper.rb
385
- - spec/api/server_spec.rb
386
342
  - spec/api/session_proxy/class_sharding_session_proxy_spec.rb
387
343
  - spec/api/session_proxy/id_sharding_session_proxy_spec.rb
388
344
  - spec/api/session_proxy/master_slave_session_proxy_spec.rb
@@ -395,19 +351,23 @@ test_files:
395
351
  - spec/api/sunspot_spec.rb
396
352
  - spec/ext.rb
397
353
  - spec/helpers/indexer_helper.rb
354
+ - spec/helpers/integration_helper.rb
355
+ - spec/helpers/mock_session_helper.rb
398
356
  - spec/helpers/query_helper.rb
399
357
  - spec/helpers/search_helper.rb
400
358
  - spec/integration/dynamic_fields_spec.rb
401
359
  - spec/integration/faceting_spec.rb
360
+ - spec/integration/field_grouping_spec.rb
361
+ - spec/integration/geospatial_spec.rb
402
362
  - spec/integration/highlighting_spec.rb
403
363
  - spec/integration/indexing_spec.rb
404
364
  - spec/integration/keyword_search_spec.rb
405
365
  - spec/integration/local_search_spec.rb
406
366
  - spec/integration/more_like_this_spec.rb
407
367
  - spec/integration/scoped_search_spec.rb
408
- - spec/integration/spec_helper.rb
409
368
  - spec/integration/stored_fields_spec.rb
410
369
  - spec/integration/test_pagination.rb
370
+ - spec/integration/unicode_spec.rb
411
371
  - spec/mocks/adapters.rb
412
372
  - spec/mocks/blog.rb
413
373
  - spec/mocks/comment.rb