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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e312a23715f960ec3aff18884337fdfad812e45affbd3560b762fa9fcf03068
4
- data.tar.gz: 3e48d7f1ddf3ec8cebb26485dbb7d2e16ba97dc21c1740d8d0626621a5de38d8
3
+ metadata.gz: cf56be7da5f62aba197eef67d1d4066e22f412fe8a41e2fd215bed3aaae1677c
4
+ data.tar.gz: 458e999a50ceb471830acb813cf09b750b93cdd8b1629b34bc1a56465cd819d4
5
5
  SHA512:
6
- metadata.gz: 789dc0e6587391e86f43ec2a1d76b1637ce844090d2876a44dc015996249f981d455136cb5eeae51941a0bc7adf309e01b08a0c8358bdefab5f5737fde856015
7
- data.tar.gz: cf3c9a0b723f52b6f7aea973ab4a460a2e22bfa03071e36478ea1823218c1077cb083c1932cd33e2bf12fe25789f5714f501df2d1cecfa74078fdb266387f189
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 ["id"] = UUIDTools::UUID.random_create #add a unique ID
74
+ document [@document_id_field] = UUIDTools::UUID.random_create #add a unique ID
74
75
  else
75
- document ["id"] = event.sprintf(@document_id) #or use the one provided
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-m4'
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mantis-logstash-output-solr_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5.pre.m4
4
+ version: 3.0.5.pre.m5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic