index-tanked 0.1.10 → 0.1.11

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.
@@ -9,7 +9,7 @@ module IndexTanked
9
9
 
10
10
  # pass in scoped with an empty hash to give the search result a representation of the current scope
11
11
  def search_index_tank(query, options={})
12
- SearchResult.new(index_tanked.add_fields_to_query(query), @index_tanked.index, scoped({}), options)
12
+ SearchResult.new(index_tanked.add_fields_to_query(query, options), @index_tanked.index, scoped({}), options)
13
13
  end
14
14
 
15
15
  def add_all_to_index_tank(options={})
@@ -15,7 +15,11 @@ module IndexTanked
15
15
 
16
16
  def records(options={})
17
17
  base = @model
18
- base = base.scoped(:conditions => {:id => ids})
18
+ if defined?(Squirrel) && base.respond_to?(:scoped_without_squirrel)
19
+ base = base.scoped_without_squirrel(:conditions => {:id => ids})
20
+ else
21
+ base = base.scoped(:conditions => {:id => ids})
22
+ end
19
23
  records_found = base.all(options)
20
24
  @missing_ids = ids - records_found.map(&:id)
21
25
  begin
@@ -43,6 +47,10 @@ module IndexTanked
43
47
  end
44
48
  end
45
49
 
50
+ def inspect
51
+ "<IndexTanked::ActiveRecordDefaults::SearchResult:#{object_id}, Query:'#{@query}'>"
52
+ end
53
+
46
54
  end
47
55
  end
48
56
  end
@@ -8,7 +8,7 @@ module IndexTanked
8
8
  end
9
9
 
10
10
  def search_index_tank(query, options={})
11
- SearchResult.new(index_tanked.add_fields_to_query(query), index_tanked.index, options)
11
+ SearchResult.new(index_tanked.add_fields_to_query(query, options), index_tanked.index, options)
12
12
  end
13
13
 
14
14
  def add_to_index_tank(doc_id, data, fallback=true)
@@ -1,3 +1,3 @@
1
1
  module IndexTanked
2
- GEM_VERSION = '0.1.10'
2
+ GEM_VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: index-tanked
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 10
10
- version: 0.1.10
9
+ - 11
10
+ version: 0.1.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Kittelson