indexers 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cd1b4b219caffd4cd86cf1f86a49aaa90fe8911
4
- data.tar.gz: 6fd8d22673623460b65ecd70c6d1655f4baa02fb
3
+ metadata.gz: 7a69fd1403cede1d8ceec8faa48067e9e56e1b55
4
+ data.tar.gz: a58daceb7cdae9e7e07dd813780f41a3dc3cc969
5
5
  SHA512:
6
- metadata.gz: 2bbf0c594fd26479d00c5a9fa69782b22d64427b145126e9f1ed7d7178dae78e089ab2a751407728dd67ef8d619fcf10bace527bcfc4e8d74b596e698e767317
7
- data.tar.gz: a06663d9bb75f8bb9e3fe74e39bf6b3de31bc9d65ec7723fa12fa2e7fb37e1162291bdbc696ebcb1a2e19b632dd7c7e6aed4570758107d6fffeb7f1fe8268622
6
+ metadata.gz: '004947c47596612f52e88805c47e37d02f6ae8dbfc5e204b20cc0e0eab74e88c3df84c7476d32f8a82eca8e6b6c043337da5fb49917854cd024f7fd2e54dd50e'
7
+ data.tar.gz: e54dded2cd8857a972bdd2e895c2ba622da191f3ecf62878d65bb5999d648a8a3e98a4b888c697decc7d59cfeac1341af5ece33545453028e1c2889b7ab77acf
@@ -56,7 +56,7 @@ module Indexers
56
56
  values << { _script: Dsl::Api.new(direction, &block).to_h }
57
57
  elsif property == :id
58
58
  values << { _uid: { order: direction } }
59
- elsif mappings.has_key?(property) && mappings[property][:type] == 'text'
59
+ elsif mappings.has_key?(property) && mappings[property][:type] == 'string'
60
60
  values << { "#{property}.raw" => { order: direction } }
61
61
  end
62
62
  end
@@ -7,7 +7,7 @@ module Indexers
7
7
  if block_given?
8
8
  @mappings = Dsl::Api.new(&block).to_h
9
9
  else
10
- @mappings
10
+ @mappings ||= {}
11
11
  end
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ module Indexers
15
15
  if block_given?
16
16
  @analysis = { analysis: Dsl::Api.new(&block).to_h }
17
17
  else
18
- @analysis
18
+ @analysis ||= {}
19
19
  end
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ module Indexers
15
15
  end
16
16
 
17
17
  def add_argument(name, args, options)
18
- if name == :query && args.any?
18
+ if name == :query && args.first.try(:is_a?, Symbol)
19
19
  indexer = Indexers.definitions.find(args.first)
20
20
  hash = self.class.new(indexer, [options], &indexer.options[:search]).to_h
21
21
  @parent[name] = hash[:query]
@@ -1,5 +1,5 @@
1
1
  module Indexers
2
2
 
3
- VERSION = '5.1.0'
3
+ VERSION = '5.1.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indexers
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmontossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails