PHP Class Wallmander\ElasticsearchIndexer\Model\Indexer

Author: Mikael Mattsson ([email protected])
Inheritance: extends Client
Afficher le fichier Open project: wallmanderco/elasticsearch-indexer Class Usage Examples

Méthodes publiques

Méthode Description
deletePost ( integer $postsID ) Delete post index.
getIndexablePostStati ( ) : array
getIndexablePostTypes ( ) : array
getSearchablePostTypes ( ) : array
indexPost ( integer | object $post ) : array | boolean
indexPosts ( array $posts )
prepareMeta ( $post ) : array
prepareMetaNum ( array $meta ) : array
preparePost ( $post ) : object
reindex ( integer $site, integer $from, integer $size ) : array Called in admin to reindex all posts in all blogs.
setRefreshInterval ( string $interval = '1s' ) Set refresh_interval on all indexes.
updatePost ( integer $postsID, $data ) Update post index.

Méthodes protégées

Méthode Description
flush ( ) Delete existing index, create new index and add mappings.
prepareDateTerms ( $post_date_gmt ) : array
prepareTerms ( $post ) : array
reindexBlog ( integer $offset, integer $postsPerPage = 500 ) : array Reindex all posts in current blog.

Method Details

deletePost() public méthode

Delete post index.
public deletePost ( integer $postsID )
$postsID integer

flush() protected méthode

Delete existing index, create new index and add mappings.
protected flush ( )

getIndexablePostStati() public static méthode

public static getIndexablePostStati ( ) : array
Résultat array

getIndexablePostTypes() public static méthode

public static getIndexablePostTypes ( ) : array
Résultat array

getSearchablePostTypes() public static méthode

public static getSearchablePostTypes ( ) : array
Résultat array

indexPost() public méthode

public indexPost ( integer | object $post ) : array | boolean
$post integer | object
Résultat array | boolean

indexPosts() public méthode

public indexPosts ( array $posts )
$posts array

prepareDateTerms() protected static méthode

Author: 10up/ElasticPress
protected static prepareDateTerms ( $post_date_gmt ) : array
$post_date_gmt
Résultat array

prepareMeta() public static méthode

public static prepareMeta ( $post ) : array
$post
Résultat array

prepareMetaNum() public static méthode

public static prepareMetaNum ( array $meta ) : array
$meta array
Résultat array

preparePost() public static méthode

Author: 10up/ElasticPress
public static preparePost ( $post ) : object
$post
Résultat object

prepareTerms() protected static méthode

protected static prepareTerms ( $post ) : array
$post
Résultat array

reindex() public méthode

Called in admin to reindex all posts in all blogs.
public reindex ( integer $site, integer $from, integer $size ) : array
$site integer
$from integer
$size integer
Résultat array

reindexBlog() protected méthode

Reindex all posts in current blog.
protected reindexBlog ( integer $offset, integer $postsPerPage = 500 ) : array
$offset integer
$postsPerPage integer
Résultat array

setRefreshInterval() public méthode

Set refresh_interval on all indexes.
public setRefreshInterval ( string $interval = '1s' )
$interval string

updatePost() public méthode

Update post index.
public updatePost ( integer $postsID, $data )
$postsID integer