Skip to main content

Setting up basic search service

Note that the Elastic search server can be installed on a seperate server (neither TS file indexing or the application server is required).

Install: Elastic search server

Elastic search server (version 5) will run standalone and will require Java 8 or higher

  1. Download Elastic search zip archieve
  2. Unpack files to suitable location
  3. Start elastic.bat in /bin folder
  https://www.elastic.co/downloads/elasticsearch

For Linux you can follow the guide in Install with tar

 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.9.1-x86_64.rpm
 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.9.1-x86_64.rpm.sha512
 shasum -a 512 -c elasticsearch-8.9.1-x86_64.rpm.sha512 
 sudo rpm --install elasticsearch-8.9.1-x86_64.rpm
 sudo rpm -e elasticsearch-8.9.1-x86_64.rpm

Alternatively use this script

 sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
 sudo sh -c 'curl https://gist.githubusercontent.com/nl5887/b4a56bfd84501c2b2afb/raw/elasticsearch.repo >> /etc/yum.repos.d/elasticsearch.repo'
 sudo yum install -y elasticsearch  
 sudo chkconfig elasticsearch on
 sudo nano /etc/elasticsearch/jvm.options
 -Xms256m
 -Xmx256m
 sudo service elasticsearch start
 curl 'http://localhost:9200/app/_count?pretty&q='y

Install: TS file indexing service (TSFIS)

For TSFIS to run yo will need a servlet container (Tomcat,JBoss,Oracle AS).

  1. Download tsFileIndexingService.war
  2. Dump to webapplication folder on application server
  3. Change settings in web.xml
    • Database connection strings: If on same server just copy the seeting from your main application
    • ExecutableGhostscript: Path to Ghostscript (see above)
    • ExecutableTerrasect: Path to Terrasect OCR module (see above)
    • ElasticServerAddress: IP or servername where ElastisSearch is installed (see above)
  4. Restart server (to reload DB credentials)
  5. Test application at: <server>/tsFileIndexingService/execute

Network configuration

In the event that Elastic search or the file indexer is not on the same server you will need to ensure that

  • Open port 3306 fra TS file indexing service to MySQL database (normally the application server)
  • Open port 2100 fra TS file indexing service to ElasticSearch server
  • Open port 2100 fra Tempus Serva application to ElasticSearch server

Also remember to update configrations for server names

Multi application setup

  1. Setup a shared table for lucenefilequeue using views
    • Delete the lucenefilequeue table in all slave databases
    • Create a view of lucenefilequeue pointing to the master database
  2. TS file indexing service must have a user with access to all TS databases

Multiple instances will have a shard each in the Elastic index