elastic_record 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/elastic_record.gemspec +1 -1
- data/lib/elastic_record/relation/search_methods.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf412880ffb7a51e9660070d1e68c8e0d733984
|
4
|
+
data.tar.gz: 2e01c188802352a80910796cdae7b77247abd62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db1885120690e7d07809bb88906f79ddcca1214d03077bc182b2242ea37263b53a258328a12c7ea89624040a761023cfec003b873f7a5d36b46731a4ab52a202
|
7
|
+
data.tar.gz: fc7bb9667ce4c963d745d05f5ff48e8fc68913b49c25cf8ccc1b572ef1c5ae3a6fe2396992628b74a650bff54d1d2f54df2030f35e4e9363dd0c450f09850991
|
data/README.md
CHANGED
@@ -36,6 +36,7 @@ development:
|
|
36
36
|
## Search API ##
|
37
37
|
|
38
38
|
ElasticRecord adds the method 'elastic_search' to your models. It works similar to active_record scoping:
|
39
|
+
|
39
40
|
```ruby
|
40
41
|
search = Product.elastic_search
|
41
42
|
```
|
@@ -208,7 +209,9 @@ Product.elastic_index.get_mapping # Get the index mapping defined by elas
|
|
208
209
|
|
209
210
|
By default, ElasticRecord uses ActiveSupport::JSON to serialize Elasticsearch payloads. There
|
210
211
|
is optional support for using the Oj gem. To use Oj, ensure that oj is required and set:
|
212
|
+
|
211
213
|
```ruby
|
212
214
|
ElasticRecord::JSON.parser = :oj
|
213
215
|
```
|
216
|
+
|
214
217
|
To return to the default parser, set the variable to :active_support.
|
data/elastic_record.gemspec
CHANGED
@@ -214,7 +214,7 @@ module ElasticRecord
|
|
214
214
|
|
215
215
|
def build_filter_nodes(filters)
|
216
216
|
filters.each_with_object([]) do |filter, nodes|
|
217
|
-
if filter.is_a?(Arelastic::
|
217
|
+
if filter.is_a?(Arelastic::Nodes::Node)
|
218
218
|
nodes << filter
|
219
219
|
elsif filter.is_a?(ElasticRecord::Relation)
|
220
220
|
nodes << Arelastic::Filters::HasChild.new(filter.elastic_index.type, filter.as_elastic['query'])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infogroup
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arelastic
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: 1.8.11
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.5.1
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: An Elasticsearch querying ORM
|