Edit settings in the search-config.xml file
to configure Search for file attachments.
Before you begin
To edit configuration files, you must
use the IBM® WebSphere® Application Server wsadmin client.
See Starting the wsadmin
client for details.
About this task
Search provides a dedicated document conversion service.
When a file indexing task is run, the document conversion service
downloads files, converts them to plain text, and then indexes the
content. During this process, content from different MIME types is
indexed. For a list of the MIME types supported by Search, see Supported
MIME types.The behavior of the document conversion service
can be altered by modifying various settings, allowing administrators
to control the file content indexing process.
IBM Connections supports the indexing of file
attachment content from the Files and Wikis applications. Content
from file attachments in Activities, Blogs, and Forums is not searched.
Attention: When file indexing is enabled, the content of files
is not indexed the first time that the index is run. The first index
starts the process of retrieving the file content, but the actual
indexing of the content only takes place when the index is run for
the second time.
Procedure
To configure file attachment indexing settings, complete
the following steps.
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
app_server_root\profiles\dm_profile_root\bin
where app_server_root is
the WebSphere Application
Server installation directory and dm_profile_root is
the Deployment Manager profile directory, typically dmgr01.You
must start the client from this directory or subsequent commands that
you enter do not execute correctly.
- After the wsadmin command environment
has initialized, enter the following command to initialize the Search
environment and start the Search script interpreter:
execfile("searchAdmin.py")
If prompted to specify a service to connect to, type 1 to pick
the first node in the list. Most commands can run on any node. If
the command writes or reads information to or from a file using a
local file path, you must pick the node where the file is stored.When
the command is run successfully, the following message displays:
Search Administration initialized
- Check out the Search cell-level
configuration file, search-config.xml, using
the following command:
SearchCellConfig.checkOutConfig("working_dir",
"cellName")
where:
- working_dir is the temporary directory to which you want to check out the
cell level configuration file. This directory must exist on the server where you are running the
wsadmin client. Use forward slashes to separate directories in the file path,
even if you are using the Microsoft
Windows operating system.
Note: IBM i , AIX®, and Linux only: The directory must
grant write permissions or the command will not run successfully.
- cellName is the name of the cell that the Search
node belongs to. This argument is required. It is also case-sensitive,
so type it with care. If you do not know the cell name, you can determine
it by typing the following command in the wsadmin command processor:
print
AdminControl.getCell()
For example:
SearchCellConfig.checkOutConfig("c:/search_temp", "SearchServerNode01Cell")
- Use the following commands to control the file content
indexing process.
- SearchCellConfig.enableAttachmentHandling()
Enables the indexing of file attachments in the Files and Wikis
applications.
Note: If you already disabled the attachment handling
of files during the last indexing, you need to rebuild the index again
after enabling attachment handling. Otherwise, this command won't
take effect.
This command does not take any input parameters.
- SearchCellConfig.disableAttachmentHandling()
Disables the indexing of file content in the Files, Wikis,
and Library (ECM Files) applications.
This command
does not take any input parameters.
- SearchCellConfig.setMaximumAttachmentSize(int maxAttachmentSize)
Sets the limit on the size of files that can be downloaded
for indexing. Files that are greater than the configured maximum attachment
size are not downloaded or processed for content indexing. By default,
the limit is set to 50 MB, which means that files over 50 MB are not
indexed.
Files that are under the specified size are downloaded to a temporary directory located in the
index directory, where they go through the text extraction process. The extracted text is then
indexed. The temporary directory size available must be greater than the maximum file size allowed
for content indexing.
This
command accepts one argument:
- maxAttachmentSize. The maximum file size in bytes of any file
attachment eligible for indexing. This is an integer value.
For example:
SearchCellConfig.setMaximumAttachmentSize("52428800")
- SearchCellConfig.setMaximumConcurrentDownloads(int maxConcurrentDownloads)
Sets the maximum number of threads that perform file downloading
on a Search server.
This command takes a single argument that
specifies the maximum number of threads. The argument must be an integer
greater than zero. The default value is 3. The value of the maxConcurrentDownloads
argument must not exceed the maximum number of threads set for the
DefaultWorkManager Work Manager resources at the Search server scope.
CAUTION:
Increasing this value increases the load on the Files
server.
For example:
SearchCellConfig.setMaximumConcurrentDownloads("10")
- SearchCellConfig.setMaximumTempDirSize(int maxTempDirSize)
Sets the maximum size of a temporary directory used by a Search
server for the files conversion process.
This command takes
a single argument that specifies the maximum size in bytes. The argument
must be an integer greater than zero. The default value is 100 MB.
Files
are downloaded to a temporary directory, which is located in the index
directory. The temporary directory size available must be greater
than the maximum file size allowed for content indexing.
For
example:
SearchCellConfig.setMaximumTempDirSize("51200")
- SearchCellConfig.setDownloadThrottle(long downloadThrottle)
Sets the duration of a rest period between successive files
downloads in a single file-download thread.
This command takes
a single argument that specifies the download throttle size in milliseconds.
The download throttle is set to 500 by default.
CAUTION:
Increasing
this value increases the load on the Files server.
For
example:
SearchCellConfig.setDownloadThrottle("500")
- Check in the updated search-config.xml configuration
file using the following wsadmin client command:
SearchCellConfig.checkInConfig()
- To exit the wsadmin client, type exit at
the prompt.
- Stop the server or servers hosting the Search application, and then restart the Search servers. The next time the scheduled task runs, persisted seedlists are retained after indexing
finishes.