Elastic search and OCR

From TempusServa wiki
Revision as of 10:53, 29 November 2016 by old>Admin (→‎Install: Elastic search server)
Jump to navigation Jump to search

Understanding integrated search

The integrated fulltext serach using Elatic search is a internal/active approach to indexing the content. Content will be added to a indexing queue every time it is updated - ensuring allways updated content, but consuming CPU ressources on the indexing server.

Beacuase file indexing is very CPU intensive, the file indexing functionality i seperated into a service that can run on a server seperated from te main application server. Anyway the fileindexer will run from a database queue, so in most cases seperation is not strictly required.

The basic search service requires

  • TS file indeing service (queue handler)
  • Elastic search server (search engine)

For multitenant setups a single TS file indexing service can service multiple instances, as long as they write requests to the same queue (using DB views). The Elastic search server can also handle multiple applications.

If PDF OCR functionality is needed the following components needs installation too

  • Ghostscript (PDF to TIFF conversion)
  • Tesseract (OCR library)

The above components for OCR must be installed on the file indexing server.

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: 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 connection information in web.xml
  4. Restart server (to reload DB credentials)
  5. Test application at: <server>/tsFileIndexService/execute

Install: Elastic search server

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

  1. Download Elastic search
  2. Unpack files to suitable location
  3. Start elastic.bat in /bin folder

Multi application setup

Adding OCR capability

Both OCR components msut be installed on the same server as TS file indexing service.

Install: Ghostscript binaries

Install: Tesseract binaries