Skip to main content

AzureSearchCommitter

Commit documents to Microsoft Azure Search.

committer/azurecognitivesearchJavadoc: AzureSearchCommitter

Notes​

Commits crawled documents to a Microsoft Azure Cognitive Search index. Supports field mappings, Base64 document key encoding, Windows authentication, and configurable handling of response and validation errors.

Examples​

The following example uses the minimum required settings to configure Microsoft Azure Search Committer.

class: AzureSearchCommitter
endpoint: https://example.search.windows.net
apiKey: 1234567890ABCDEF1234567890ABCDEF
indexName: sample-index

Usage​

Full configuration skeleton, with every option and its default
class: AzureSearchCommitter
acl:
flatPrefix: string
format: NATIVE
partial: REJECT
apiKey: string
apiVersion: string
arrayFields: string
arrayFieldsRegex: false
disableDocKeyEncoding: false
endpoint: string
fieldMappings: {}
ignoreResponseErrors: false
ignoreValidationErrors: false
indexName: string
proxySettings:
credentials:
password: string
passwordKey: {}
username: string
host:
name: string
port: 0
realm: string
scheme: string
queue:
class: FsQueue
batchSize: 0
commitLeftoversOnInit: false
maxPerFolder: 0
onCommitFailure:
ignoreErrors: false
maxRetries: 0
retryDelay: 0
splitBatch: OFF
restrictions:
- fieldMatcher: {}
valueMatcher: {}
sourceKeyField: string
targetContentField: string
targetKeyField: string
useWindowsAuth: false

Properties​

PropertyTypeRequiredDefault
aclAclCommitterConfigNoAclCommitterConfig
apiKeystringNo-
apiVersionstringNo2020-06-30
arrayFieldsstringNo-
arrayFieldsRegexbooleanNofalse
disableDocKeyEncodingbooleanNofalse
endpointstringNo-
fieldMappingsRecord<string, string>No-
ignoreResponseErrorsbooleanNofalse
ignoreValidationErrorsbooleanNofalse
indexNamestringNo-
proxySettingsProxySettingsNoProxySettings
queueCommitterQueueNoFsQueue
restrictionsPropertyMatcher[]No-
sourceKeyFieldstringNo-
targetContentFieldstringNocontent
targetKeyFieldstringNoid
useWindowsAuthbooleanNofalse

Property Details​

acl​

How this committer sends the access control list (ACL) a document carries in its crawler.acl field, written by the fetchers that read a source's permissions:

  • format: JSON sends the field as it is; FLAT replaces it with plain fields (below); NATIVE writes it as the destination's own access control, for committers whose destination has one; NONE does not send it. When not set, the committer's default applies (NATIVE where available, otherwise JSON).
  • partial: what to do with a document whose permissions could only be read in part: REJECT (the default) or SEND.
  • flatPrefix: the prefix of the FLAT fields. Default is acl.

A document whose permissions cannot be vouched for is withheld: it is not sent, a version sent before is removed from the destination, and the crawler tries it again on its next run. That is the case when its ACL is partial and partial is REJECT, when its permissions could not be read at all, when the ACL is unreadable or of an unknown version, or when NATIVE cannot express it. A withheld document is never sent as readable by everyone.

With FLAT, acl.levels names the checks a person must pass, in order, and each level has an allow field and a deny field holding principals as kind:dir:id (or special:id):

acl.levels = share, file
acl.share.allow = group:ad:CORP:Sales
acl.file.allow = group:ad:CORP:Sales
acl.file.deny = group:ad:CORP:Interns
acl.owners = user:ad:CORP:pascal

A person may see the document if they match an allow value of every level and no deny value of any.

apiKey​

Azure Search API admin key.

apiVersion​

A specific Azure Search API version to use.

arrayFields​

Field whose values are forcefully sent as array, even if they are single values. Unless "Use Regular Expression for Array Fields" is checked, expects a comma-separated list of field names.

arrayFieldsRegex​

Use regular expression instead of comma-separated values when defining "Array Fields".

disableDocKeyEncoding​

Disable Base64 encoding of the document document reference (Azure Search Document Key). Base64 is the preferred approach when your document key can contain special characters.

endpoint​

Azure Search endpoint.

fieldMappings​

Mapping of source fields to target ones (Azure Search fields).

ignoreResponseErrors​

Log Azure Search response errors instead of throwing an exception.

ignoreValidationErrors​

Do not perform validation of field names before sending a batch of documents to Azure Search.

indexName​

Name of the target Azure Search index where to send documents.

proxySettings​

Configures an optional HTTP proxy for outbound connections. Leave unset to connect directly.

queue​

Configures the committer queue used to batch documents before sending them to the target system. Adjust queue settings to tune throughput and memory usage.

restrictions​

Defines filter conditions that restrict which documents this committer processes. Documents not matching the restrictions are ignored by this committer.

sourceKeyField​

Source document field name containing the value that will be stored in Azure Search target document key field. Default is the document reference.

targetContentField​

Name of Azure Search document field name to store document content. Default is "content".

targetKeyField​

Name of Azure Search document field where to store a document unique key identifier ("Source Key Field"). Default is "id".

useWindowsAuth​

Use Windows authentication to connect.