waistband 0.9.0 → 0.9.1
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.
- data/README.md +1 -0
- data/lib/waistband/index.rb +2 -2
- data/lib/waistband/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
|
@@ -164,6 +164,7 @@ results = index.search({
|
|
|
164
164
|
|
|
165
165
|
results.hits # => returns a search results object
|
|
166
166
|
results.total_hits # => 28481
|
|
167
|
+
```
|
|
167
168
|
|
|
168
169
|
For paginating the results, you can use the `#paginated_results` method, which requires the [Kaminari](https://github.com/amatsuda/kaminari), gem. If you use another gem, you can just override the method, etc.
|
|
169
170
|
|
data/lib/waistband/index.rb
CHANGED
|
@@ -64,14 +64,14 @@ module Waistband
|
|
|
64
64
|
def save(*args)
|
|
65
65
|
body_hash = args.extract_options!
|
|
66
66
|
id = args.first
|
|
67
|
-
|
|
67
|
+
_type = body_hash.delete(:_type) || default_type_name
|
|
68
68
|
|
|
69
69
|
# map everything to strings if need be
|
|
70
70
|
body_hash = stringify_all(body_hash) if @stringify
|
|
71
71
|
|
|
72
72
|
saved = client.index(
|
|
73
73
|
index: config_name,
|
|
74
|
-
type:
|
|
74
|
+
type: _type,
|
|
75
75
|
id: id,
|
|
76
76
|
body: body_hash
|
|
77
77
|
)
|
data/lib/waistband/version.rb
CHANGED