Remotely Manage Index

From DBSight Full-Text Search Engine/Platform Wiki

Table of contents


Remotely Sending Indexing Request

Suppose you are on computer A, and DBSight is running on computer B, port 8080.

If you need to issue an Incremental Indexing request, just like choosing it via dashboard.

  1. Make sure computer A is on "Allowed IP or Host Name List" in Advanced Settings
  2. From computer A, using sending an HTTP request with long URL like this, remember to replace "freedb" with your index name.

Incremental Indexing

scheduleAJob.do?indexName=freedb&cmd=stopIndexing%20ping-url-before%20unlockStoppedIndex%20createPeriodTable%20maybeBuildSynonyms%20incrementalIndexingWithFastDeletion%20mergeIndexesIfNeeded%20buildDictionaryIfNeeded%20ping-url-after&text=Incremental%20Indexing

Re-Create Whole Index

scheduleAJob.do?indexName=freedb&cmd=stopIndexing%20ping-url-before%20unlockStoppedIndex%20maybeBuildSynonyms%20reCreateIndex%20mergeIndexesIfNeeded%20reBuildDictionary%20buildDictionaryIfNeeded%20ping-url-after&text=Recreate%20Index

These commands' parameters actually can be found dashboard html code.

The full URL should starts something like one of the following

http://computerB:8080/scheduleAJob.do
http://computerB:8080/dbsight/scheduleAJob.do

If you do so, you may need to avoid long urls by put double quotes around the url

wget "http://computerB:8080/scheduleAJob.do?...."

Remotely Trigger Garbage Collection

Sometimes you want to control garbage collection of the server. To do so, send a http request like this

http://computer:8080/gc.do
http://computer:8080/dbsight/gc.do

The allowed source of http request are:

  1. authenticated admin user currently in session
  2. localhost/127.0.0.1
  3. any allowed IP/domain name of any index

Remotely Ping DBSight

If you want to check if DBSight is running or hanging, you can send a http request like this

http://computer:8080/ping.do
http://computer:8080/dbsight/ping.do

The response should be a string "OK". No security checking for this ping action.

Remotely Get DBSight Status in XML format

All the paratmers are the same as queryReport.do and showIndexUsageXML.do. You may find more information by checking their parameter usage.

queryReportXML.do
queryReportXML.do?action=refresh            //force to refresh query statistics
queryReportXML.do?period=1440               //status for the last 1440 seconds
showIndexUsageXML.do?indexName=abc&period=1440&action=refresh

However, only showIndexUsageXML.do is accessible without login if the IP address is in the "Allowed IP Address List".

FAQ

What happens if an incremental index is running and I execute another request to do incremental index remotely?

There is only one indexing process at any moment. So newly scheduled one will be delayed.

Can I schedule 2 indexing processes for 2 different indexes?

Yes.