lstash 0.0.8 → 0.0.9

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2Y0MGRlYmVkZmM1OTRjOGU2YmVmMmY1ZTEzMDllNWNiMjBiMjVjNQ==
4
+ NTgxYmI5NWQ2ZmE3OGY1NDE0ZGNjN2M1ZGQ2ZWYxNGI5ODY0MGY1NQ==
5
5
  data.tar.gz: !binary |-
6
- NTk3YWI4ZGM2MzNiMGFjMjUxMjYyMmM4ZGUyODkyZDBhZTQwZTNiNw==
6
+ ZTgzZmQ0YTU3MTAwZDA1MWI1MjNmMjM0M2M5NWY1Mjk5NWRmMTM4OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWUzNDc5ZTk3MTE0YmM0ZDlkZjExZjM4MGY4MGZjYzYyYzNmZDg3ZWZiMzgw
10
- Y2YwZGJlYTA3YjgxNjYwMWU0MjRlMWFkZDcyMWE0MWUzMWU1ZGNiM2MzNTJi
11
- YWUyOTBiZDJhNzY2ODg4OWM1ZTA4OWVlNjFhNDAyNjg5ZGUwYTA=
9
+ YThlNDM0OTNjZTNhYWI3ODc4MDc5ZjUyOGJhMTBmZTc4YjI3Nzc2YTZiMjFl
10
+ ZDk0YTQ3NGNkZDNmMThhN2Y2ODVmOWY5NTliYzQ3MTZmNzc2YzEzZTNmZjU4
11
+ YjAzMTMxNzEwZDgzNDdjMTM2ZTRlYjZjNjZmM2VlMzJkMTE0NDY=
12
12
  data.tar.gz: !binary |-
13
- YzBkYWM3MjcyZDE0OGRiZDg4YTFhYzNmNDM0MzMxODVjMjRiY2FiNWIxNmU2
14
- NWQxZmE4NWI4NWU4MGIyMWFlODgwMmUwMzUzN2FkZjFkZmFkZDNkYTQ5YjEy
15
- MWNhOTU0ZmRkMTY0NDM5Yzk5NTE5OTNmMzI0MzNjMjlmNGJlODE=
13
+ N2Y5NWI5ZDdiNGNjOTFhMTJkMjJjMzVmZmExZTQ1NjFhZjMzNGU3MDdjMDFi
14
+ ZDE4Y2U5MGUyYzY3NTI5N2MyMDE5MDY2NjVhYWVhZTY2Mzk5YmFmNmVkM2Rm
15
+ ZjI2ZmYwOTE5NWMxNmI5YTlmYTdjMjRkY2QxZDRlOWNmMjAzNDU=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 0.0.9 / 2014-09-22
2
+
3
+ Enhancements
4
+
5
+ * We only every print the 'message' field. To optimize we only query for the 'message' field
6
+ to be returned in the results. This should cut down the size of the returned json documents
7
+ which could potentially be (very) large.
8
+
1
9
  ### 0.0.8 / 2014-09-01
2
10
 
3
11
  Bug Fixes
data/lib/lstash/client.rb CHANGED
@@ -72,7 +72,7 @@ module Lstash
72
72
  scroll_params = {scroll_id: result._scroll_id}
73
73
 
74
74
  messages.each do |h|
75
- yield h._source.message if block_given?
75
+ yield h.fields.message if block_given?
76
76
  end
77
77
 
78
78
  method = :scroll
data/lib/lstash/query.rb CHANGED
@@ -38,6 +38,8 @@ module Lstash
38
38
  {
39
39
  sort: sort_order,
40
40
 
41
+ fields: %w(message),
42
+
41
43
  # return in order of ascending timestamp
42
44
  query: {
43
45
  filtered: {
@@ -1,3 +1,3 @@
1
1
  module Lstash
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -52,7 +52,7 @@ describe Lstash::Client do
52
52
  def hits(messages)
53
53
  {
54
54
  hits: {
55
- hits: messages.map { |m| { _source: { message: m }}}
55
+ hits: messages.map { |m| { fields: { message: m }}}
56
56
  }
57
57
  }
58
58
  end
@@ -107,6 +107,7 @@ describe Lstash::Query do
107
107
  context "body" do
108
108
  its(:body) { should eq ({
109
109
  :sort => [{"@timestamp"=>{:order=>"asc"}}],
110
+ :fields => %w(message),
110
111
  :query => {:filtered=>{
111
112
  :query => { :bool => { :should => [ { :query_string => { :query=>"*" }}]}},
112
113
  :filter=> { :bool => { :must => [ { :range => { "@timestamp" => { :from => 1407016800000, :to => 1407074073000}}}]}}}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaas Jan Wierenga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-01 00:00:00.000000000 Z
11
+ date: 2014-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler