Added Methods for Index Management CLI
/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/username/p/password/cmd/getIndexName/XXX [XXX = live/working] Desc: The function "getIndexName" when supplied with "live/working" gives the "active" index name.
/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/username/p/password/cmd/getIndexStatus/
Desc: The function "getIndexStatus" when supplied with "index-name" gives the status of the index from one of the values [active, inactive, processing [is shown during "index restoration" process]]
/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/username/p/password/cmd/getIndexRecordCount/
getNotActiveIndexNames/[live/working] : Gets all the "live/working" inactive index names. stopReindexThread : Returns true/false startReindexThread : Returns true/false getReindexThreadStatus : Returns active/stopped
Dean lets QA/Doc this one together
Here were my results, see my comments next to each command:
-
Get Index Name (returns nothing) curl http://demo.dotcms.com:8080/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getIndexName/working
-
Get Index Status (always returns "inactive") curl http://demo.dotcms.com:8080/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getIndexStatus/working_20120928151126
Desc: The function "getIndexStatus" when supplied with "index-name" gives the status of the index from one of the values [active, inactive, processing [is shown during "index restoration" process]]
- Get Index Record Count (always returns zero)
curl http://localhost:8082/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getIndexRecordCount/working_20120928151126
Desc: The function "getIndexRecordCount" when supplied with index name gives the total records it contains.
- Get Non-Active Index Names (returns all of each type on each command)
getNotActiveIndexNames/[live/working] : Gets all the "live/working" inactive index names.
curl http://localhost:8082/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getNotActiveIndexNames/live
curl http://localhost:8082/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getNotActiveIndexNames/working
- StopReindexThread: Returns true/false (seems to stop thread)
curl http://demo.dotcms.com:8080/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/stopReindexThread
- startReindexThread : Returns true/false (oddly, seems to stop instead of start thread)
curl http://demo.dotcms.com:8080/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/startReindexThread
- getReindexThreadStatus : Returns active/stopped (always states stopped - even when active)
curl http://demo.dotcms.com:8080/DotAjaxDirector/com.dotmarketing.portlets.cmsmaintenance.ajax.IndexAjaxAction/u/[email protected]/p/admin/cmd/getReindexThreadStatus/live_20121003103023
Meeting with JT and Daniel to sort this one out
Tested commands here http://www.dotcms.com/docs/latest/RESTfulAPItoManageIndexes , working right.