logstash-output-custom-solr 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/solr.rb +17 -17
- data/logstash-output-custom-solr.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3205d97edee2f83daa2f520b29c26415162ab97a66f241c014a0d64004ba744
|
4
|
+
data.tar.gz: cf361397e3a85d1be0d8a97ab96576a7fbfe4a5e40585e3142f29635112a04bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9da08f12bcb572406aa6777cccfa8b03b1d40338cac3a354326b2ebedae8c7daec70488d083cff9d60200b12afdf98b917d79f5e8e5f5638a51663da9e2271c
|
7
|
+
data.tar.gz: c54d0d8e30e69e8a6c73ec7c579255a00a7d6c85b05196f6173905e4d43e2301019200e8fd98aea1e4ac0e40a834772c05d5ec4e3f28bdc15d12b9f4abde9537
|
@@ -77,28 +77,28 @@ class LogStash::Outputs::Solr < LogStash::Outputs::Base
|
|
77
77
|
def flush(events, close=false)
|
78
78
|
documents = []
|
79
79
|
|
80
|
-
|
80
|
+
#@fields = @defined_fields.nil? || @defined_fields.empty? ? get_fields : @defined_fields
|
81
81
|
|
82
|
-
|
82
|
+
#@unique_key = @unique_key_field.nil? ? get_unique_key : @unique_key_field
|
83
83
|
|
84
84
|
events.each do |event|
|
85
85
|
document = event.to_hash()
|
86
86
|
|
87
|
-
unless document.has_key?(@unique_key) then
|
88
|
-
document.merge!({@unique_key => SecureRandom.uuid})
|
89
|
-
end
|
90
|
-
|
91
|
-
unless document.has_key?(@timestamp_field) then
|
92
|
-
document.merge!({@timestamp_field => document['@timestamp']})
|
93
|
-
end
|
94
|
-
|
95
|
-
if @ignore_undefined_fields then
|
96
|
-
document.each_key do |key|
|
97
|
-
unless @fields.include?(key) then
|
98
|
-
document.delete(key)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
87
|
+
#unless document.has_key?(@unique_key) then
|
88
|
+
#document.merge!({@unique_key => SecureRandom.uuid})
|
89
|
+
#end
|
90
|
+
|
91
|
+
#unless document.has_key?(@timestamp_field) then
|
92
|
+
#document.merge!({@timestamp_field => document['@timestamp']})
|
93
|
+
#end
|
94
|
+
|
95
|
+
#if @ignore_undefined_fields then
|
96
|
+
#document.each_key do |key|
|
97
|
+
#unless @fields.include?(key) then
|
98
|
+
#document.delete(key)
|
99
|
+
#end
|
100
|
+
#end
|
101
|
+
#end
|
102
102
|
|
103
103
|
@logger.info 'Record: %s' % document.inspect
|
104
104
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-custom-solr'
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.5"
|
4
4
|
s.licenses = ["Apache License (2.0)"]
|
5
5
|
s.summary = "Logstash output plugin for sending data to Solr."
|
6
6
|
s.description = "Logstash output plugin for sending data to Solr. It supports SolrCloud, not only Standalone Solr."
|