PHP Class ElasticPress_CLI_Command

Inheritance: extends WP_CLI_Command
Exibir arquivo Open project: 10up/elasticpress

Public Methods

Method Description
activate_module ( array $args, array $assoc_args ) Activate a module.
deactivate_module ( array $args, array $assoc_args ) Dectivate a module.
delete_index ( array $args, array $assoc_args ) Delete the current index. !!Warning!! This removes your elasticsearch index for the entire site.
index ( array $args, array $assoc_args ) Index all posts for a site or network wide
list_modules ( array $args, array $assoc_args ) List modules (either active or all)
put_mapping ( array $args, array $assoc_args ) Add the document mapping
recreate_network_alias ( array $args, array $assoc_args ) Map network alias to every index in the network
stats ( ) Get stats on the current index.
status ( ) Ping the Elasticsearch server and retrieve a status.
stop_the_insanity ( ) Resets some values to reduce memory footprint.

Private Methods

Method Description
_connect_check ( ) Provide better error messaging for common connection errors
_create_network_alias ( ) : array | boolean Helper method for creating the network alias
_index_helper ( array $args ) : array Helper method for indexing posts
bulk_index ( boolean $show_bulk_errors = false ) Perform the bulk index operation
queue_post ( $post_id, $bulk_trigger, boolean $show_bulk_errors = false ) : boolean | integer Queues up a post for bulk indexing
send_bulk_errors ( ) Send any bulk indexing errors

Method Details

activate_module() public method

Activate a module.
Since: 2.1
public activate_module ( array $args, array $assoc_args )
$args array
$assoc_args array

deactivate_module() public method

Dectivate a module.
Since: 2.1
public deactivate_module ( array $args, array $assoc_args )
$args array
$assoc_args array

delete_index() public method

Delete the current index. !!Warning!! This removes your elasticsearch index for the entire site.
Since: 0.9
public delete_index ( array $args, array $assoc_args )
$args array
$assoc_args array

index() public method

Index all posts for a site or network wide
Since: 0.1.2
public index ( array $args, array $assoc_args )
$args array
$assoc_args array

list_modules() public method

List modules (either active or all)
Since: 2.1
public list_modules ( array $args, array $assoc_args )
$args array
$assoc_args array

put_mapping() public method

Add the document mapping
Since: 0.9
public put_mapping ( array $args, array $assoc_args )
$args array
$assoc_args array

recreate_network_alias() public method

Map network alias to every index in the network
Since: 0.9
public recreate_network_alias ( array $args, array $assoc_args )
$args array
$assoc_args array

stats() public method

Get stats on the current index.
Since: 0.9.2
public stats ( )

status() public method

Ping the Elasticsearch server and retrieve a status.
Since: 0.9.1
public status ( )

stop_the_insanity() public method

Resets some values to reduce memory footprint.
public stop_the_insanity ( )