co-elastic-query 1.0.3 → 1.0.4

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: 29167287ed81d7deb378c47079d78638cbb981b3
4
- data.tar.gz: 9b45192f4c28d0e875c99a9c2d11dc084e01d13c
3
+ metadata.gz: 6b4f754d95872b184d47e43938ab77ba7ead62dd
4
+ data.tar.gz: aca341b09604fc28b093ca935ed93915b9835d2c
5
5
  SHA512:
6
- metadata.gz: 47c03c8bcddb3dac6e7a9752809e0ca059f5ac66db64dfeb59fd4876031eab3db3f37a164e8e89d374b7cf2c96eda71a17f5835bdae0e46af9fb5bbc4462164e
7
- data.tar.gz: 1cee889bfd71aa06492c2ac2259aa1350fa17bf776ba8c17cd9d0be916158c8864a4efe920478b34e9b5f38381d7984611c14e91152c098580cbfdf055f99a0d
6
+ metadata.gz: ef2c4b80f074cb8b94d9c9a2447b012ee25dff5ebcf9956413889d44f373ac0acfb5be632a12af07637e8951d5550067c434af7d1a38fd658f870e05ac1749d6
7
+ data.tar.gz: 3a783054d18e7a96a5fc7675551d1bfa01bb2d510d86730fef0e04c9febcc374bc1241f558134a526485c3b9944f1bd0e03d9c0956f95693d5cdb225fbaf960a
@@ -217,7 +217,7 @@ class Elastic
217
217
  query_obj
218
218
  else
219
219
  {
220
- sort: @sort || [{created_at: 'desc'}],
220
+ sort: @sort || DEFAULT_SORT,
221
221
  filters: fieldfilters,
222
222
  query: {
223
223
  match_all: {}
@@ -228,6 +228,13 @@ class Elastic
228
228
  end
229
229
  end
230
230
 
231
+ DEFAULT_SORT = [{
232
+ created_at: {
233
+ order: :desc,
234
+ unmapped_type: :integer
235
+ }
236
+ }]
237
+
231
238
 
232
239
  #protected
233
240
 
@@ -1,3 +1,3 @@
1
1
  module CoElasticQuery
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: co-elastic-query
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-18 00:00:00.000000000 Z
12
+ date: 2015-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler