mantis-logstash-output-solr_http 3.0.5.pre.m4 → 3.0.5.pre.m5
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 +4 -4
- data/lib/logstash/outputs/solr_http.rb +3 -2
- data/logstash-output-solr_http.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: cf56be7da5f62aba197eef67d1d4066e22f412fe8a41e2fd215bed3aaae1677c
|
4
|
+
data.tar.gz: 458e999a50ceb471830acb813cf09b750b93cdd8b1629b34bc1a56465cd819d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d9251fb51cf10ca425b8275c3cb0201bf3b9e518f2b50e4327c36ca149b4a48df7b81ab8e81048fffde989cd9b9cce11d7f06af8ca167a20a65b39e606810e9
|
7
|
+
data.tar.gz: 7ee0078971e182ad0d6b534730892fbad0f03acbabca77e0b361cc5f960e774fd155aff08ef2b4ee129e0841b4bf080d968c1a17568c0e5ef608add1f7f0873e
|
@@ -38,6 +38,7 @@ class LogStash::Outputs::SolrHTTP < LogStash::Outputs::Base
|
|
38
38
|
# Solr document ID for events. You'd typically have a variable here, like
|
39
39
|
# '%{foo}' so you can assign your own IDs
|
40
40
|
config :document_id, :validate => :string, :default => nil
|
41
|
+
config :document_id_field, :validate => :string, :default => "id"
|
41
42
|
|
42
43
|
public
|
43
44
|
def register
|
@@ -70,9 +71,9 @@ class LogStash::Outputs::SolrHTTP < LogStash::Outputs::Base
|
|
70
71
|
document = event.to_hash()
|
71
72
|
|
72
73
|
if @document_id.nil?
|
73
|
-
document [
|
74
|
+
document [@document_id_field] = UUIDTools::UUID.random_create #add a unique ID
|
74
75
|
else
|
75
|
-
document [
|
76
|
+
document [@document_id_field] = event.sprintf(@document_id) #or use the one provided
|
76
77
|
end
|
77
78
|
documents[url].push(document)
|
78
79
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'mantis-logstash-output-solr_http'
|
4
|
-
s.version = '3.0.5-
|
4
|
+
s.version = '3.0.5-m5'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Stores and indexes logs in Solr"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|