Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Solr Publisher can be configured using the Rest API. 

Easy Heading Free
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Solr Publisher Properties


Type of the clear. 2 options here :

  • "deleteAllDocuments" - deletes documents with the index
  • "deleteIndex" - recreates the whole index (with or without requested mapping)
FieldRequiredDefaultMultipleNotesExample
typeYes-No

The value must be "application".

"application"

_typeYes-No

The value must be "application".

"application"

appNameYes-NoThe name of the application"Solr_Publisher"
appTypeYes-NoThe value must be "solr-publisher"."solr-publisher"
configYes-NoThe value must be "com.accenture.aspire:app-sample-summarizer"."com.accenture.aspire:aspire-solr-publisher-source"
descriptionYes-NoThe description

"solr_publisher"

propertiesYes-NoConfiguration object
elasticNoUrluseHostYesfalseNoSelects how to enter the Elasticsearch URL. True: server and port are specified. False: full URL is specified.Specify a Solr update URL by entering parts of it or the complete pathtrue / false
elasticUrlsolrCoreNo-NoEnter the URL for the Elasticsearch bulk index endpoint, it must have this format <protocol>://<host>:<port>/_bulk . Required if elasticNoUrl is false."http://myServer:9200"Solr URL core. Example: myCore."test_core"
solrHostelasticHostNo-NoEnter the Elasticsearch host. Required if elasticNoUrl is trueSolr server hostname or IP address. Example: solr.domain.com."myServerloclahost"
elasticPortsolrPortNo92008983NoEnter the Elasticsearch Solr port . Required if elasticNoUrl is truenumber. Example: 8983."92018983"
elasticIndexsolrUrlYesNo-NoEnter the index to which the jobs are going to be publish.The complete Solr update URL. Multiple hosts can be added separating them with a semi-colon (;)"http://localhost:8983/solr/core/update?commitWithin=30000"test-index"
authTypeNo-NoSpecify the authentication information. Allowed values are: "none" , or "basic" and "aws"."none"
userNo-NoProvide the user for basic authentication. Required if authType is "basic"."john.doe"
passwordNo-NoProvide the password for basic authentication. Required if authType is "basic"."myP@ssword11"
awsRegionNo-NoSpecify the AWS region to use. Required if authType is "aws"."us-east-2"
useCredentialsProviderChainNofalseNoEnable to specify a credentials provider chain.true / false
awsAccessKeyNo-NoProvide the access key for authentication with AWS. Required if authType is "aws" and useCredentialsProviderChain is false."AKIAQYO33L5HIS3N55NN"
awsSecretKeyNo-NoProvide the secret key for authentication with AWS. Required if authType is "aws" and useCredentialsProviderChain is false."PPA3Qt+FqUA4Kk07DRS7w4T6Bya1IWebbcqFmqmI"
transformTypeYes-NoType of the transformation file used."JSON"
transformFileYes-NoPath to the transform file. The default value is set to "${component.home}/config/groovy/transform.groovy" for the default JSON transformation file provided with Aspire."C:\transformfiles\groovy\mytransform.groovy"processClearNofalseNoSet to true to clear the index on full crawls.true / falseclearTypeYes if processClear = Yes-No"deleteAllDocuments"
uploadMappingsNofalseNoUpload Mappings. Relevant for clearType "deleteIndex"true / false
uploadMappingsFromNofalseNoSource for the mappings. Required if uploadMappings is true. If uploadsMappingFrom is true the mappings will be used from the parameter below otherwise from the filetrue / false
mappingsTextNo-NoMappings specified directly. Required if uploadMappings is true and uploadMappingsFrom is true."{\"mappings\":{\"properties\":{\"doc._id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\"}}}}}}"
uploadMappingsFileNo-NoMappings file path.  Required if uploadMappings is true and uploadMappingsFrom is false."C:\mappings\myMappings\myMappingsFile.txt"
idleConnectionTimeoutNo-NoMaximum time (in milliseconds) to keep an idle connection open.3600000
maxConnectionsNo-NoMaximum number of connections to be opened.100
maxConnectionsPerRouteNo-NoMaximum number of connections opened for the same target.10
connectionTimeoutNo-NoMaximum time (in milliseconds) to wait for the connection.15000
socketTimeoutNo-NoMaximum time (in milliseconds) to wait for a socket response.15000
useThrottlingNo-NoSet to true to specify Throttling Settings.true / false
throttlingRateNo5000NoTime period (in milliseconds) to throttle the connection.6000
throttlingConnectionRateNo500NoMaximum number of connections used during the Throttling Period.600
maxRetriesNo3NoMaximum number of retries for a failed document.5
retryWaitTimeNo5NoTime period (in milliseconds) to wait before a retry.6000
batchSizeNo-NoMaximum size of the batches that will be created.50
simultaneousBatchesNo-NoNumber of batches that will be processed simultaneously.5
batchTimeoutNo-NoPeriod (in ms) after which a batch of documents will be closed and executed.5000
debugNo-NoSet to true to enable debug mode to show debug messages from the publisher.true / false

Create example


Code Block
themeRDark
titlePOST /aspire/_api/connections
{
	  "type": "application",
	  "_type": "publisher",
  "appName": "Solr Publisher",
	  "descriptionappType": "ElasticsearchPublisherTestsolr-publisher",
	  "config": "com.accenture.aspire:aspire-elasticsearchsolr-publisher-source",
	  "appTypedescription": "elasticsearch-publisherSolrPublisher",
	"appName": "Elasticsearch Publisher",
	"properties": {
		"elasticNoUrl    "useHost": truefalse,
		"elasticHost    "solrUrl": "myEShost",
		"elasticPort": 9200,
		"elasticIndex": "test-index",
		"authType": "none",
		"http://localhost:8983/solr/test/update?commitWithin=30000",
    "transformType": "JSON",
		    "transformFile": "${component.home}/config/groovy/transform.groovy",
    "authType": "basic",
    "user": "admin",
		"processClear    "password": false"encrypted:100CCB558E536015B5765BA68A52E8C3F7EF16359153EFDE8282760EDA8B07D9",
		    "idleConnectionTimeout": 3600000,
		    "maxConnections": 100,
		    "maxConnectionsPerRoute": 10,
		,
    "sharedConnection": false,
    "connectionTimeout": 15000,
		    "socketTimeout": 15000,
		    "useThrottling": false,
		    "maxRetries": 3,
		    "retryWaitTime": 5000,
		    "batchSize": 50,
		    "simultaneousBatches": 5,
		    "batchTimeout": 5000,
		    "debug": false
	  }
}