fluent-plugin-output-solr 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-output-solr.gemspec +1 -1
- data/lib/fluent/plugin/out_solr.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1c6f8222ca0caa3aab7d45245fabcb11e366829
|
4
|
+
data.tar.gz: 9a764db856bc8c0a929d69cb83513d02c05cac6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98e5f570b06cb21f647bd716adeacf1ae97860153c4a0786d1be1c3bd51cacc373ae0e4a71ddcb7f271635989112455289dde153979383a4b4e5a0e8de3a007e
|
7
|
+
data.tar.gz: 8328972f13b14dfe7660d16e630e6ae7a8076f7a7ca370d018f557a8e6dbd00b43cbcf1fd27bdb66a40b6459d5a66bd523652605679edcb264b0c360a396f5fb
|
@@ -120,12 +120,15 @@ module Fluent
|
|
120
120
|
record.merge!({@timestamp_field => Time.at(time).utc.strftime('%FT%TZ')})
|
121
121
|
end
|
122
122
|
|
123
|
-
|
123
|
+
log.info record
|
124
|
+
|
125
|
+
if to_boolean(@ignore_undefined_fields) then
|
124
126
|
record.each_key do |key|
|
125
127
|
unless @fields.include?(key) then
|
126
128
|
record.delete(key)
|
127
129
|
end
|
128
130
|
end
|
131
|
+
log.info record
|
129
132
|
end
|
130
133
|
|
131
134
|
documents << record
|
@@ -139,6 +142,12 @@ module Fluent
|
|
139
142
|
update documents unless documents.empty?
|
140
143
|
end
|
141
144
|
|
145
|
+
def to_boolean(string)
|
146
|
+
return true if string== true || string =~ (/(true|t|yes|y|1)$/i)
|
147
|
+
return false if string== false || string.nil? || string =~ (/(false|f|no|n|0)$/i)
|
148
|
+
raise ArgumentError.new("invalid value for Boolean: \"#{string}\"")
|
149
|
+
end
|
150
|
+
|
142
151
|
def update(documents)
|
143
152
|
if @mode == MODE_STANDALONE then
|
144
153
|
@solr.add documents, :params => {:commit => true}
|