afs_layer_load - AFS - Reference Guides

AFS Filters Description

Product
AFS
AFS_Version
7.11
Category
Reference Guides
language
English

The layer loader filter allows the PaF to get external documents (attachments) which have to be indexed with the main document.

The filter is declared with the afs_layer_load type. It is in the antidot-paf package. It is a processor filter.

This filter can be instantiated only once at any given moment. It will not read the "instances" parameter in the configuration.

The XML Layer Loader filter specifications are described in the following table:

Parameter name

Mandatory

Type

Default

Description

xpaths

Yes

list

N/A

It is the list of the xpaths to read.

basic_authorization

No

string

N/A

For basic authorization, it takes the login:passwd form.

custom_headers

No

list

empty list

Define a list of custom HTTP 1.1 headers for each query, in the form "Accept: text/xml;q=0.5,*/*;q=0.1"

download_limit

No

integer

Infinite

It is the top limit of content to load.

follow_redirection

No

boolean

false

Define if the filters have to follow redirections or not.

nsmap

No

map

Empty

Namespaces map for interpreting the xpaths.

timeout

No

integer

60

Time before the filter stops the current connection if the remote server does not reply.

user_agent

No

string

Antidot/Afs7Crawler

It is the user-agent used to connect to the server.

output_layer

No

layer

USER_1

First layer filled by attachments (see filter description for more details)

delayMs

No

integer

0

Time (in ms) between each call.

input_layer

No

layer

CONTENTS

It is the layer which contains the XML data.

Note: The xml layer load filter must be used when indexing attachments.
It is necessary that the initial document can be processed as XML. The filter gets a list of xpaths and interprets the content of a URI. When successful, it loads the binary content in a layer of the current document.
Attention: This filter considers all the xpath results and increments automatically the layer for each successful loaded layer. For example, when an xpath gives three correct URI results and when the writing_layer parameter is USER_1, the three binary data items are stored in USER_1, USER_2 and USER_3.
Tip: The following protocols are supported to resolve the URI: - FILE, - HTTP, - HTTPS, - FTP.
Tip: The following URIs extracted from xpaths: - /directory/documents/my_doc.pdf - file:///directory/documents/my_doc.pdf - file://localhost/directory/documents/my_doc.pdf are interpreted as FILE.