By using administration requests you can simply manage SynAdmin via a script or batch file. The parameter '&action=' in the URL http://<server>:<port>/<WebOfficeApplication>/synadmin?client=adminbatch&password=<password_uncoded>&action= calls commands to SynAdmin.
Der Parameter 'action' can assume the following content:
•action=restart
restart of the application
•action=reload_resources
reload ressources for a certain project (with parameter '&project=')
•action=recreate_fts_index&subindex=...
Recreation of a defined subindex. Enter complete subindex name. Sample:
http://<server>:<port>/<WebOfficeApplikation>/synadmin?client=adminbatch&action=recreate_fts_index&subindex=agslocal|w-ws-furrer|Testprojekte_JF/JF_lucy_testdata_Graz//Graz//adressen_
Using &subindex=ALL all subindices will be recreated. Sample:
http://<server>:<port>/<WebOfficeApplikation>/synadmin?client=adminbatch&action=recreate_fts_index&subindex=ALL
Note: The complete URL for the recreation of a specific subindex can be found in SynAdmin in the tab "Full-Text Search" in the details of a particular layer (URL for Index Creation). It is possible to add the parameter "&password=" for the password of the administration site (SynAdmin) to the URL. The password has to be written in plain terms (uncoded). If you use special characters in the password (e.g. #), be sure to encode those characters (e.g. %23).
Note: The recreation of subindices should be done automatically using batch scripts. Use the windows task scheduler for executing the scripts hourly/daily. During the recreation the projects could be used normally (search, etc.) because the index recreation is independent.
If you add the command chcp 1252 at the begin of the batch file, you don't have to care about the encoding of special characters. Example:
date /t
time /t
@ECHO OFF
chcp 1252
echo.
start http://<host-name>/<WebOffice-Applikation>/synadmin?client=adminbatch"&"action=recreate_fts_index"&"subindex=ALL"&"password=öäüß
•action=status_fts_index&subindex=...
provides information about the current state of a certain subindex. Enter complete subindex name. Sample:
http://<server>:<port>/<WebOfficeApplikation>/synadmin?client=adminbatch&action=status_fts_index&subindex=agslocal|w-ws-furrer|Testprojekte_JF/JF_lucy_testdata_Graz//Graz//adressen
The name of thematic subindices consists of projectname_externalID. Sample:
http://<server>:<port>/<WebOfficeApplikation>/synadmin?client=adminbatch&action=recreate_fts_index&subindex=WebOffice_SampleProject_AIR
Using &subindex=ALL the state of all subindices will be shown. Sample:
http://<server>:<port>/<WebOfficeApplikation>/synadmin?client=adminbatch&action=status_fts_index&subindex=ALL
Note: The state of a FTS subindex can have the following values:
▪SCHEDULED
▪CREATING
▪CREATED
▪UNNEEDED
▪MISSING
▪FAILED
▪ABORTING
▪OUT_OF_DATE
The value UNKNOWN_SUBINDEX_NAME is returned, if the subindex does not exist.
IMPORTANT Note: Keep in mind that windows .bat files need a special syntax implying that all & and | that are components of the URL have to be quoted. An example for a batch file that will recreate a specific subindex could look like:
start http://w-vpc-sw-w7-e:8080/WebOffice_LatestBuild/synadmin?client=adminbatch"&"action=recreate_fts_index"&"subindex=agslocal"|"w-vpc-sw-w7-e"|"LowerAustriaEdit//Eisenbahn//Bahnhoefe"&"password=xxx
You can download a sample of a batch script for recreating the whole FTS-Index script here. In this sample you have to adjust
•the host-name,
•the name of the weboffice application and
•the password of synadmin.