sunspot 1.3.3 → 2.0.0.pre.111215
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -10
- data/lib/sunspot/configuration.rb +5 -0
- data/lib/sunspot/dsl/field_group.rb +37 -0
- data/lib/sunspot/dsl/field_query.rb +48 -0
- data/lib/sunspot/dsl/restriction_with_near.rb +17 -0
- data/lib/sunspot/dsl.rb +1 -1
- data/lib/sunspot/query/common_query.rb +10 -0
- data/lib/sunspot/query/dismax.rb +5 -1
- data/lib/sunspot/query/field_group.rb +35 -0
- data/lib/sunspot/query/geofilt.rb +15 -0
- data/lib/sunspot/query/sort.rb +14 -0
- data/lib/sunspot/query/sort_composite.rb +3 -2
- data/lib/sunspot/query.rb +2 -2
- data/lib/sunspot/search/abstract_search.rb +52 -64
- data/lib/sunspot/search/field_group.rb +32 -0
- data/lib/sunspot/search/group.rb +35 -0
- data/lib/sunspot/search/hit_enumerable.rb +72 -0
- data/lib/sunspot/search/paginated_collection.rb +5 -3
- data/lib/sunspot/search.rb +1 -1
- data/lib/sunspot/session_proxy.rb +0 -8
- data/lib/sunspot/type.rb +21 -0
- data/lib/sunspot/version.rb +1 -1
- data/spec/api/class_set_spec.rb +1 -1
- data/spec/api/hit_enumerable_spec.rb +47 -0
- data/spec/api/query/group_spec.rb +32 -0
- data/spec/api/query/ordering_pagination_examples.rb +7 -0
- data/spec/api/query/spatial_examples.rb +11 -0
- data/spec/api/query/standard_spec.rb +1 -0
- data/spec/api/search/paginated_collection_spec.rb +10 -0
- data/spec/api/search/results_spec.rb +6 -0
- data/spec/integration/field_grouping_spec.rb +65 -0
- data/spec/integration/geospatial_spec.rb +59 -0
- data/spec/integration/highlighting_spec.rb +20 -0
- data/spec/mocks/post.rb +1 -0
- data/sunspot.gemspec +2 -1
- metadata +54 -34
- data/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb +0 -67
- data/spec/api/session_proxy/retry_5xx_session_proxy_spec.rb +0 -73
data/lib/sunspot/search.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
%w(abstract_search standard_search more_like_this_search query_facet field_facet
|
2
|
-
date_facet facet_row hit highlight).each do |file|
|
2
|
+
date_facet facet_row hit highlight field_group group hit_enumerable).each do |file|
|
3
3
|
require File.join(File.dirname(__FILE__), 'search', file)
|
4
4
|
end
|
5
5
|
|
data/lib/sunspot/type.rb
CHANGED
@@ -354,6 +354,27 @@ module Sunspot
|
|
354
354
|
end
|
355
355
|
end
|
356
356
|
|
357
|
+
#
|
358
|
+
# The Latlon type encodes geographical coordinates in the native
|
359
|
+
# Solr LatLonType.
|
360
|
+
#
|
361
|
+
# The data for this type must respond to the `lat` and `lng` methods; you
|
362
|
+
# can use Sunspot::Util::Coordinates as a wrapper if your source data does
|
363
|
+
# not follow this API.
|
364
|
+
#
|
365
|
+
# Location fields can be used with the geospatial DSL. See the
|
366
|
+
# Geospatial section of the README for examples.
|
367
|
+
#
|
368
|
+
class LatlonType < AbstractType
|
369
|
+
def indexed_name(name)
|
370
|
+
"#{name}_ll"
|
371
|
+
end
|
372
|
+
|
373
|
+
def to_indexed(value)
|
374
|
+
"#{value.lat.to_f},#{value.lng.to_f}"
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
357
378
|
class ClassType < AbstractType
|
358
379
|
def indexed_name(name) #:nodoc:
|
359
380
|
'class_name'
|
data/lib/sunspot/version.rb
CHANGED
data/spec/api/class_set_spec.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "spec_helper")
|
2
|
+
|
3
|
+
describe Sunspot::Search::HitEnumerable do
|
4
|
+
subject do
|
5
|
+
Class.new do
|
6
|
+
include Sunspot::Search::HitEnumerable
|
7
|
+
end.new
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#hits" do
|
11
|
+
before do
|
12
|
+
subject.stub(:solr_docs).and_return([{"id" => "Post 1", "score" => 3.14}])
|
13
|
+
subject.stub(:highlights_for)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "retrieves the raw Solr response from #solr_docs and constructs Hit objects" do
|
17
|
+
Sunspot::Search::Hit.should_receive(:new).
|
18
|
+
with({"id" => "Post 1", "score" => 3.14}, anything, anything)
|
19
|
+
|
20
|
+
subject.hits
|
21
|
+
end
|
22
|
+
|
23
|
+
it "constructs Hit objects with highlights" do
|
24
|
+
subject.should_receive(:highlights_for).with({"id" => "Post 1", "score" => 3.14})
|
25
|
+
|
26
|
+
subject.hits
|
27
|
+
end
|
28
|
+
|
29
|
+
it "returns only verified hits if :verify => true is passed" do
|
30
|
+
Sunspot::Search::Hit.any_instance.stub(:result).and_return(nil)
|
31
|
+
|
32
|
+
subject.hits(:verify => true).should be_empty
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns an empty array if no results are available from Solr" do
|
36
|
+
subject.stub(:solr_docs).and_return(nil)
|
37
|
+
|
38
|
+
subject.hits.should == []
|
39
|
+
end
|
40
|
+
|
41
|
+
it "provides #populate_hits so that querying for one hit result will eager load the rest" do
|
42
|
+
Sunspot::Search::Hit.any_instance.should_receive(:result=)
|
43
|
+
|
44
|
+
subject.populate_hits
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path('spec_helper', File.dirname(__FILE__))
|
2
|
+
|
3
|
+
describe "field grouping" do
|
4
|
+
it "sends grouping parameters to solr" do
|
5
|
+
session.search Post do
|
6
|
+
group :title
|
7
|
+
end
|
8
|
+
|
9
|
+
connection.should have_last_search_including(:group, "true")
|
10
|
+
connection.should have_last_search_including(:"group.field", "title_ss")
|
11
|
+
end
|
12
|
+
|
13
|
+
it "sends grouping limit parameters to solr" do
|
14
|
+
session.search Post do
|
15
|
+
group :title do
|
16
|
+
limit 2
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
connection.should have_last_search_including(:"group.limit", 2)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "sends grouping sort parameters to solr" do
|
24
|
+
session.search Post do
|
25
|
+
group :title do
|
26
|
+
order_by :average_rating
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
connection.should have_last_search_including(:"group.sort", "average_rating_ft asc")
|
31
|
+
end
|
32
|
+
end
|
@@ -75,6 +75,13 @@ shared_examples_for 'sortable query' do
|
|
75
75
|
connection.should have_last_search_with(:sort => 'score desc')
|
76
76
|
end
|
77
77
|
|
78
|
+
it 'orders by geodist' do
|
79
|
+
search do
|
80
|
+
order_by_geodist :coordinates_new, 32, -68, :desc
|
81
|
+
end
|
82
|
+
connection.should have_last_search_with(:sort => 'geodist(coordinates_new_ll,32,-68) desc')
|
83
|
+
end
|
84
|
+
|
78
85
|
it 'throws an ArgumentError if a bogus order direction is given' do
|
79
86
|
lambda do
|
80
87
|
search do
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'bigdecimal'
|
2
|
+
|
3
|
+
shared_examples_for "spatial query" do
|
4
|
+
it 'filters by radius' do
|
5
|
+
search do
|
6
|
+
with(:coordinates_new).in_radius(23, -46, 100)
|
7
|
+
end
|
8
|
+
|
9
|
+
connection.should have_last_search_including(:fq, "{!geofilt sfield=coordinates_new_ll pt=23,-46 d=100}")
|
10
|
+
end
|
11
|
+
end
|
@@ -11,6 +11,7 @@ describe 'standard query', :type => :query do
|
|
11
11
|
it_should_behave_like "sortable query"
|
12
12
|
it_should_behave_like "query with text field scoping"
|
13
13
|
it_should_behave_like "geohash query"
|
14
|
+
it_should_behave_like "spatial query"
|
14
15
|
|
15
16
|
it 'adds a no-op query to :q parameter when no :q provided' do
|
16
17
|
session.search Post do
|
@@ -14,6 +14,16 @@ describe "PaginatedCollection" do
|
|
14
14
|
it { subject.next_page.should eql(2) }
|
15
15
|
it { subject.out_of_bounds?.should_not be_true }
|
16
16
|
it { subject.offset.should eql(0) }
|
17
|
+
|
18
|
+
it 'should allow setting total_count' do
|
19
|
+
subject.total_count = 1
|
20
|
+
subject.total_count.should eql(1)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should allow setting total_entries' do
|
24
|
+
subject.total_entries = 1
|
25
|
+
subject.total_entries.should eql(1)
|
26
|
+
end
|
17
27
|
end
|
18
28
|
|
19
29
|
context "behaves like Kaminari" do
|
@@ -42,6 +42,12 @@ describe 'search results', :type => :search do
|
|
42
42
|
session.search(Post) { paginate(:page => 1) }.total.should == 4
|
43
43
|
end
|
44
44
|
|
45
|
+
it 'returns query time' do
|
46
|
+
stub_nil_results
|
47
|
+
connection.response['responseHeader'] = { 'QTime' => 42 }
|
48
|
+
session.search(Post) { paginate(:page => 1) }.query_time.should == 42
|
49
|
+
end
|
50
|
+
|
45
51
|
it 'returns total for nil search' do
|
46
52
|
stub_nil_results
|
47
53
|
session.search(Post).total.should == 0
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.expand_path("../spec_helper", File.dirname(__FILE__))
|
2
|
+
|
3
|
+
describe "field grouping" do
|
4
|
+
before :each do
|
5
|
+
Sunspot.remove_all
|
6
|
+
|
7
|
+
@posts = [
|
8
|
+
Post.new(:title => "Title1", :ratings_average => 4),
|
9
|
+
Post.new(:title => "Title1", :ratings_average => 5),
|
10
|
+
Post.new(:title => "Title2", :ratings_average => 3)
|
11
|
+
]
|
12
|
+
|
13
|
+
Sunspot.index!(*@posts)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "allows grouping by a field" do
|
17
|
+
search = Sunspot.search(Post) do
|
18
|
+
group :title
|
19
|
+
end
|
20
|
+
|
21
|
+
search.group(:title).groups.should include { |g| g.value == "Title1" }
|
22
|
+
search.group(:title).groups.should include { |g| g.value == "Title2" }
|
23
|
+
end
|
24
|
+
|
25
|
+
it "provides access to the number of matches before grouping" do
|
26
|
+
search = Sunspot.search(Post) do
|
27
|
+
group :title
|
28
|
+
end
|
29
|
+
|
30
|
+
search.group(:title).matches.should == @posts.length
|
31
|
+
end
|
32
|
+
|
33
|
+
it "allows grouping by multiple fields" do
|
34
|
+
search = Sunspot.search(Post) do
|
35
|
+
group :title, :sort_title
|
36
|
+
end
|
37
|
+
|
38
|
+
search.group(:title).groups.should_not be_empty
|
39
|
+
search.group(:sort_title).groups.should_not be_empty
|
40
|
+
end
|
41
|
+
|
42
|
+
it "allows specification of the number of documents per group" do
|
43
|
+
search = Sunspot.search(Post) do
|
44
|
+
group :title do
|
45
|
+
limit 2
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
title1_group = search.group(:title).groups.detect { |g| g.value == "Title1" }
|
50
|
+
title1_group.hits.length.should == 2
|
51
|
+
end
|
52
|
+
|
53
|
+
it "allows specification of the sort within groups" do
|
54
|
+
search = Sunspot.search(Post) do
|
55
|
+
group :title do
|
56
|
+
order_by(:average_rating, :desc)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
highest_ranked_post = @posts.sort_by { |p| -p.ratings_average }.first
|
61
|
+
|
62
|
+
title1_group = search.group(:title).groups.detect { |g| g.value == "Title1" }
|
63
|
+
title1_group.hits.first.primary_key.to_i.should == highest_ranked_post.id
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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 with 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 "ordering by geodist" do
|
31
|
+
before :all do
|
32
|
+
Sunspot.remove_all
|
33
|
+
|
34
|
+
@posts = [
|
35
|
+
Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(34, -68)),
|
36
|
+
Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(33, -68)),
|
37
|
+
Post.new(:title => "Howdy", :coordinates => Sunspot::Util::Coordinates.new(32, -68))
|
38
|
+
]
|
39
|
+
|
40
|
+
Sunspot.index!(@posts)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "orders posts by distance ascending" do
|
44
|
+
results = Sunspot.search(Post) {
|
45
|
+
order_by_geodist(:coordinates_new, 32, -68)
|
46
|
+
}.results
|
47
|
+
|
48
|
+
results.should == @posts.reverse
|
49
|
+
end
|
50
|
+
|
51
|
+
it "orders posts by distance descending" do
|
52
|
+
results = Sunspot.search(Post) {
|
53
|
+
order_by_geodist(:coordinates_new, 32, -68, :desc)
|
54
|
+
}.results
|
55
|
+
|
56
|
+
results.should == @posts
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -5,6 +5,7 @@ describe 'keyword highlighting' do
|
|
5
5
|
@posts = []
|
6
6
|
@posts << Post.new(:body => 'And the fox laughed')
|
7
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)
|
8
9
|
Sunspot.index!(*@posts)
|
9
10
|
@search_result = Sunspot.search(Post) { keywords 'fox', :highlight => true }
|
10
11
|
end
|
@@ -21,4 +22,23 @@ describe 'keyword highlighting' do
|
|
21
22
|
search_result = Sunspot.search(Post){ with :blog_id, 1 }
|
22
23
|
search_result.hits.first.highlights.should be_empty
|
23
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
|
+
|
24
44
|
end
|
data/spec/mocks/post.rb
CHANGED
data/sunspot.gemspec
CHANGED
@@ -25,7 +25,8 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
26
26
|
s.require_paths = ["lib"]
|
27
27
|
|
28
|
-
s.add_dependency 'rsolr', '~>1.0.
|
28
|
+
s.add_dependency 'rsolr', '~>1.0.6'
|
29
|
+
s.add_dependency 'escape', '~>0.0.4'
|
29
30
|
s.add_dependency 'pr_geohash', '~>1.0'
|
30
31
|
|
31
32
|
s.add_development_dependency 'rspec', '~>2.6.0'
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunspot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: true
|
6
5
|
segments:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
|
6
|
+
- 2
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- pre
|
10
|
+
- 111215
|
11
|
+
version: 2.0.0.pre.111215
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Mat Brown
|
@@ -33,69 +34,76 @@ autorequire:
|
|
33
34
|
bindir: bin
|
34
35
|
cert_chain: []
|
35
36
|
|
36
|
-
date:
|
37
|
+
date: 2011-12-15 00:00:00 -07:00
|
38
|
+
default_executable:
|
37
39
|
dependencies:
|
38
40
|
- !ruby/object:Gem::Dependency
|
39
41
|
name: rsolr
|
40
42
|
prerelease: false
|
41
43
|
requirement: &id001 !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
44
|
requirements:
|
44
45
|
- - ~>
|
45
46
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 25
|
47
47
|
segments:
|
48
48
|
- 1
|
49
49
|
- 0
|
50
|
-
-
|
51
|
-
version: 1.0.
|
50
|
+
- 6
|
51
|
+
version: 1.0.6
|
52
52
|
type: :runtime
|
53
53
|
version_requirements: *id001
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
55
|
+
name: escape
|
56
56
|
prerelease: false
|
57
57
|
requirement: &id002 !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
58
|
requirements:
|
60
59
|
- - ~>
|
61
60
|
- !ruby/object:Gem::Version
|
62
|
-
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 0
|
64
|
+
- 4
|
65
|
+
version: 0.0.4
|
66
|
+
type: :runtime
|
67
|
+
version_requirements: *id002
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: pr_geohash
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
63
75
|
segments:
|
64
76
|
- 1
|
65
77
|
- 0
|
66
78
|
version: "1.0"
|
67
79
|
type: :runtime
|
68
|
-
version_requirements: *
|
80
|
+
version_requirements: *id003
|
69
81
|
- !ruby/object:Gem::Dependency
|
70
82
|
name: rspec
|
71
83
|
prerelease: false
|
72
|
-
requirement: &
|
73
|
-
none: false
|
84
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
85
|
requirements:
|
75
86
|
- - ~>
|
76
87
|
- !ruby/object:Gem::Version
|
77
|
-
hash: 23
|
78
88
|
segments:
|
79
89
|
- 2
|
80
90
|
- 6
|
81
91
|
- 0
|
82
92
|
version: 2.6.0
|
83
93
|
type: :development
|
84
|
-
version_requirements: *
|
94
|
+
version_requirements: *id004
|
85
95
|
- !ruby/object:Gem::Dependency
|
86
96
|
name: hanna
|
87
97
|
prerelease: false
|
88
|
-
requirement: &
|
89
|
-
none: false
|
98
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
90
99
|
requirements:
|
91
100
|
- - ">="
|
92
101
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 3
|
94
102
|
segments:
|
95
103
|
- 0
|
96
104
|
version: "0"
|
97
105
|
type: :development
|
98
|
-
version_requirements: *
|
106
|
+
version_requirements: *id005
|
99
107
|
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"
|
100
108
|
email:
|
101
109
|
- mat@patch.com
|
@@ -121,6 +129,7 @@ files:
|
|
121
129
|
- lib/sunspot/data_extractor.rb
|
122
130
|
- lib/sunspot/dsl.rb
|
123
131
|
- lib/sunspot/dsl/adjustable.rb
|
132
|
+
- lib/sunspot/dsl/field_group.rb
|
124
133
|
- lib/sunspot/dsl/field_query.rb
|
125
134
|
- lib/sunspot/dsl/fields.rb
|
126
135
|
- lib/sunspot/dsl/fulltext.rb
|
@@ -146,9 +155,11 @@ files:
|
|
146
155
|
- lib/sunspot/query/date_field_facet.rb
|
147
156
|
- lib/sunspot/query/dismax.rb
|
148
157
|
- lib/sunspot/query/field_facet.rb
|
158
|
+
- lib/sunspot/query/field_group.rb
|
149
159
|
- lib/sunspot/query/filter.rb
|
150
160
|
- lib/sunspot/query/function_query.rb
|
151
161
|
- lib/sunspot/query/geo.rb
|
162
|
+
- lib/sunspot/query/geofilt.rb
|
152
163
|
- lib/sunspot/query/highlighting.rb
|
153
164
|
- lib/sunspot/query/more_like_this.rb
|
154
165
|
- lib/sunspot/query/more_like_this_query.rb
|
@@ -166,8 +177,11 @@ files:
|
|
166
177
|
- lib/sunspot/search/date_facet.rb
|
167
178
|
- lib/sunspot/search/facet_row.rb
|
168
179
|
- lib/sunspot/search/field_facet.rb
|
180
|
+
- lib/sunspot/search/field_group.rb
|
181
|
+
- lib/sunspot/search/group.rb
|
169
182
|
- lib/sunspot/search/highlight.rb
|
170
183
|
- lib/sunspot/search/hit.rb
|
184
|
+
- lib/sunspot/search/hit_enumerable.rb
|
171
185
|
- lib/sunspot/search/more_like_this_search.rb
|
172
186
|
- lib/sunspot/search/paginated_collection.rb
|
173
187
|
- lib/sunspot/search/query_facet.rb
|
@@ -178,7 +192,6 @@ files:
|
|
178
192
|
- lib/sunspot/session_proxy/class_sharding_session_proxy.rb
|
179
193
|
- lib/sunspot/session_proxy/id_sharding_session_proxy.rb
|
180
194
|
- lib/sunspot/session_proxy/master_slave_session_proxy.rb
|
181
|
-
- lib/sunspot/session_proxy/retry_5xx_session_proxy.rb
|
182
195
|
- lib/sunspot/session_proxy/sharding_session_proxy.rb
|
183
196
|
- lib/sunspot/session_proxy/silent_fail_session_proxy.rb
|
184
197
|
- lib/sunspot/session_proxy/thread_local_session_proxy.rb
|
@@ -193,6 +206,7 @@ files:
|
|
193
206
|
- spec/api/adapters_spec.rb
|
194
207
|
- spec/api/binding_spec.rb
|
195
208
|
- spec/api/class_set_spec.rb
|
209
|
+
- spec/api/hit_enumerable_spec.rb
|
196
210
|
- spec/api/indexer/attributes_spec.rb
|
197
211
|
- spec/api/indexer/batch_spec.rb
|
198
212
|
- spec/api/indexer/dynamic_fields_spec.rb
|
@@ -209,10 +223,12 @@ files:
|
|
209
223
|
- spec/api/query/fulltext_examples.rb
|
210
224
|
- spec/api/query/function_spec.rb
|
211
225
|
- spec/api/query/geo_examples.rb
|
226
|
+
- spec/api/query/group_spec.rb
|
212
227
|
- spec/api/query/highlighting_examples.rb
|
213
228
|
- spec/api/query/more_like_this_spec.rb
|
214
229
|
- spec/api/query/ordering_pagination_examples.rb
|
215
230
|
- spec/api/query/scope_examples.rb
|
231
|
+
- spec/api/query/spatial_examples.rb
|
216
232
|
- spec/api/query/spec_helper.rb
|
217
233
|
- spec/api/query/standard_spec.rb
|
218
234
|
- spec/api/query/text_field_scoping_examples.rb
|
@@ -228,7 +244,6 @@ files:
|
|
228
244
|
- spec/api/session_proxy/class_sharding_session_proxy_spec.rb
|
229
245
|
- spec/api/session_proxy/id_sharding_session_proxy_spec.rb
|
230
246
|
- spec/api/session_proxy/master_slave_session_proxy_spec.rb
|
231
|
-
- spec/api/session_proxy/retry_5xx_session_proxy_spec.rb
|
232
247
|
- spec/api/session_proxy/sharding_session_proxy_spec.rb
|
233
248
|
- spec/api/session_proxy/silent_fail_session_proxy_spec.rb
|
234
249
|
- spec/api/session_proxy/spec_helper.rb
|
@@ -244,6 +259,8 @@ files:
|
|
244
259
|
- spec/helpers/search_helper.rb
|
245
260
|
- spec/integration/dynamic_fields_spec.rb
|
246
261
|
- spec/integration/faceting_spec.rb
|
262
|
+
- spec/integration/field_grouping_spec.rb
|
263
|
+
- spec/integration/geospatial_spec.rb
|
247
264
|
- spec/integration/highlighting_spec.rb
|
248
265
|
- spec/integration/indexing_spec.rb
|
249
266
|
- spec/integration/keyword_search_spec.rb
|
@@ -270,6 +287,7 @@ files:
|
|
270
287
|
- tasks/rdoc.rake
|
271
288
|
- tasks/schema.rake
|
272
289
|
- tasks/todo.rake
|
290
|
+
has_rdoc: true
|
273
291
|
homepage: http://outoftime.github.com/sunspot
|
274
292
|
licenses: []
|
275
293
|
|
@@ -283,27 +301,25 @@ rdoc_options:
|
|
283
301
|
require_paths:
|
284
302
|
- lib
|
285
303
|
required_ruby_version: !ruby/object:Gem::Requirement
|
286
|
-
none: false
|
287
304
|
requirements:
|
288
305
|
- - ">="
|
289
306
|
- !ruby/object:Gem::Version
|
290
|
-
hash: 3
|
291
307
|
segments:
|
292
308
|
- 0
|
293
309
|
version: "0"
|
294
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
|
-
none: false
|
296
311
|
requirements:
|
297
|
-
- - "
|
312
|
+
- - ">"
|
298
313
|
- !ruby/object:Gem::Version
|
299
|
-
hash: 3
|
300
314
|
segments:
|
301
|
-
-
|
302
|
-
|
315
|
+
- 1
|
316
|
+
- 3
|
317
|
+
- 1
|
318
|
+
version: 1.3.1
|
303
319
|
requirements: []
|
304
320
|
|
305
321
|
rubyforge_project: sunspot
|
306
|
-
rubygems_version: 1.
|
322
|
+
rubygems_version: 1.3.6
|
307
323
|
signing_key:
|
308
324
|
specification_version: 3
|
309
325
|
summary: Library for expressive, powerful interaction with the Solr search engine
|
@@ -311,6 +327,7 @@ test_files:
|
|
311
327
|
- spec/api/adapters_spec.rb
|
312
328
|
- spec/api/binding_spec.rb
|
313
329
|
- spec/api/class_set_spec.rb
|
330
|
+
- spec/api/hit_enumerable_spec.rb
|
314
331
|
- spec/api/indexer/attributes_spec.rb
|
315
332
|
- spec/api/indexer/batch_spec.rb
|
316
333
|
- spec/api/indexer/dynamic_fields_spec.rb
|
@@ -327,10 +344,12 @@ test_files:
|
|
327
344
|
- spec/api/query/fulltext_examples.rb
|
328
345
|
- spec/api/query/function_spec.rb
|
329
346
|
- spec/api/query/geo_examples.rb
|
347
|
+
- spec/api/query/group_spec.rb
|
330
348
|
- spec/api/query/highlighting_examples.rb
|
331
349
|
- spec/api/query/more_like_this_spec.rb
|
332
350
|
- spec/api/query/ordering_pagination_examples.rb
|
333
351
|
- spec/api/query/scope_examples.rb
|
352
|
+
- spec/api/query/spatial_examples.rb
|
334
353
|
- spec/api/query/spec_helper.rb
|
335
354
|
- spec/api/query/standard_spec.rb
|
336
355
|
- spec/api/query/text_field_scoping_examples.rb
|
@@ -346,7 +365,6 @@ test_files:
|
|
346
365
|
- spec/api/session_proxy/class_sharding_session_proxy_spec.rb
|
347
366
|
- spec/api/session_proxy/id_sharding_session_proxy_spec.rb
|
348
367
|
- spec/api/session_proxy/master_slave_session_proxy_spec.rb
|
349
|
-
- spec/api/session_proxy/retry_5xx_session_proxy_spec.rb
|
350
368
|
- spec/api/session_proxy/sharding_session_proxy_spec.rb
|
351
369
|
- spec/api/session_proxy/silent_fail_session_proxy_spec.rb
|
352
370
|
- spec/api/session_proxy/spec_helper.rb
|
@@ -362,6 +380,8 @@ test_files:
|
|
362
380
|
- spec/helpers/search_helper.rb
|
363
381
|
- spec/integration/dynamic_fields_spec.rb
|
364
382
|
- spec/integration/faceting_spec.rb
|
383
|
+
- spec/integration/field_grouping_spec.rb
|
384
|
+
- spec/integration/geospatial_spec.rb
|
365
385
|
- spec/integration/highlighting_spec.rb
|
366
386
|
- spec/integration/indexing_spec.rb
|
367
387
|
- spec/integration/keyword_search_spec.rb
|