core icon indicating copy to clipboard operation
core copied to clipboard

Added Methods for Index Management CLI

Open jtesser opened this issue 14 years ago • 3 comments

/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/ Desc: The function "getIndexRecordCount" when supplied with index name gives the total records it contains.

getNotActiveIndexNames/[live/working] : Gets all the "live/working" inactive index names. stopReindexThread : Returns true/false startReindexThread : Returns true/false getReindexThreadStatus : Returns active/stopped

jtesser avatar Jun 26 '12 12:06 jtesser

Dean lets QA/Doc this one together

jtesser avatar Jul 05 '12 12:07 jtesser

Here were my results, see my comments next to each command:

  1. 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

  2. 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]]

  1. 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.

  1. 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

  1. 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

  1. 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

  1. 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

DeanGonzalez avatar Oct 04 '12 14:10 DeanGonzalez

Tested commands here http://www.dotcms.com/docs/latest/RESTfulAPItoManageIndexes , working right.

prasadbhvn avatar May 10 '13 17:05 prasadbhvn