03-31-2016 08:58 PM
The fields in the solr documents are specified in the schema.xml and would be populated from your morphlines.conf file. What is the source data that the field is coming from? If it is something like the spooldir source, then you would just need to add a field in solr that matches the value in
basenameHeaderKey from the spooldir source .
For example if your source is:
a1.sources.src-1.type = spooldir a1.sources.src-1.channels = ch-1 a1.sources.src-1.spoolDir = /var/log/apache/flumeSpool a1.sources.src-1.basenameHeader = true
a1.sources.src-1.basenameHeaderKey = filename
Then in your solr schema.xml, you need to have a 'filename' field:
<field name="filename" type="string" indexed="true" stored="true" />
And then morphlines will pass the 'filename' header as a solr document field to the solr locator. In this example, you'd have a solr document field filename with a value of 'flumeSpool'.