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.
- Make sure computer A is on "Allowed IP or Host Name List" in Advanced Settings
- 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+updateIndex+mergeTempIndexes+updateTempIndex+mergeIndexesIfNeeded+updateIndex+unlockStoppedIndex+pruneBeforeIndexing+updateIndex+createPeriodTable+unlockStoppedIndex+startIndexing+mergeTempIndexes+updateTempIndex+mergeIndexesIfNeeded+updateIndex+buildDictionaryIfNeeded&text=remotely+incremental+indexing
Full Indexing
scheduleAJob.do?indexName=freedb&cmd=stopIndexing+updateIndex+mergeTempIndexes+updateTempIndex+mergeIndexesIfNeeded+updateIndex+unlockStoppedIndex+pruneBeforeIndexing+updateIndex+createPeriodTable+unlockStoppedIndex+fullIndexing+mergeTempIndexes+updateTempIndex+mergeIndexesIfNeeded+updateIndex+buildDictionaryIfNeeded&text=remotely+full+indexing
Re-Create Whole Index
scheduleAJob.do?indexName=freedb&cmd=stopIndexing+unlockStoppedIndex+reCreateIndex+mergeTempIndexesToMain+updateIndex+buildDictionaryIfNeeded&text=remotely+recreate+index
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:
- authenticated admin user currently in session
- localhost/127.0.0.1
- 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.
The one indexing process at any time is controlled via settings in WEB-INF/conf/quartz.properties file.
org.quartz.threadPool.threadCount = 1
So if you need to, you can increase the count to 2. But be careful not to schedule 2 indexing process at the same time for one index.
