Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (67 sloc) 3.9 KB
'analyzer' != > 'analyzer' != > 'analyzer' != >
foreach( $args['blog_id'] when foreach( $args['blog_id'] when foreach( $args['blog_id'] when
ES_CACHE_GROUP && Index ES_CACHE_GROUP && Index ES_CACHE_GROUP && Index
id return; $args['type'] id return; $args['type'] id return; $args['type']
in WP_Error( restore_current_blog(); in WP_Error( restore_current_blog(); in WP_Error( restore_current_blog();
$defaults dirname( $config['index_name'] $defaults dirname( $config['index_name'] $defaults dirname( $config['index_name']
search es_api_error_log( type search es_api_error_log( type search es_api_error_log( type
array ) is array ) is array ) is
with true count( with true count( with true count(
we { : we { : we { :
job self::TYPE_NORMAL, function job self::TYPE_NORMAL, function job self::TYPE_NORMAL, function
0; Exception $filter 0; Exception $filter 0; Exception $filter
== $blog_id, $args['blog_id'], == $blog_id, $args['blog_id'], == $blog_id, $args['blog_id'],
as ), WHERE as ), WHERE as ), WHERE
'name' switch_to_blog( => 'name' switch_to_blog( => 'name' switch_to_blog( =>
from 'not_analyzed', have from 'not_analyzed', have from 'not_analyzed', have
use so null; use so null; use so null;
are to some are to some are to some
); $config is_wp_error( ); $config is_wp_error( ); $config is_wp_error(
new 'id' 'blog_id' new 'id' 'blog_id' new 'id' 'blog_id'
< 'custom', .= < 'custom', .= < 'custom', .=
] default: $post_id ] default: $post_id ] default: $post_id
true; return that true; return that true; return that
$docs blog $blog_id $docs blog $blog_id $docs blog $blog_id
if indices doc if indices doc if indices doc
on 'index' all on 'index' all on 'index' all
0 + (int) 0 + (int) 0 + (int)
$status empty( $key $status empty( $key $status empty( $key
not it null, not it null, not it null,
0, 'post_id' $type 0, 'post_id' $type 0, 'post_id' $type
no $index_name || no $index_name || no $index_name ||
array(), 'store' or array(), 'store' or array(), 'store' or
'post' 1 'type' 'post' 1 'type' 'post' 1 'type'
post === false post === false post === false
out private of out private of out private of
catch ( } catch ( } catch ( }
$lang don't $query $lang don't $query $lang don't $query
for break; json_encode( for break; json_encode( for break; json_encode(
foreach indexing __FILE__ foreach indexing __FILE__ foreach indexing __FILE__
$ndoc 2 query $ndoc 2 query $ndoc 2 query
should false, array( should false, array( should false, array(
index false; <?php index false; <?php index false; <?php
= //TODO: /** = //TODO: /** = //TODO: /**
try $args queries try $args queries try $args queries
$wpdb; $e static $wpdb; $e static $wpdb; $e static
! $this->add_action( // ! $this->add_action( // ! $this->add_action( //
ES 'query' 12, ES 'query' 12, ES 'query' 12,
and fields es_api_run_callback( and fields es_api_run_callback( and fields es_api_run_callback(
$options public - $options public - $options public -
be get jobs be get jobs be get jobs
'-' can isset( '-' can isset( '-' can isset(
" protected $index " protected $index " protected $index
in_array( $data $post in_array( $data $post in_array( $data $post
this $data; FROM this $data; FROM this $data; FROM
a 'index_name' posts a 'index_name' posts a 'index_name' posts
var */ . var */ . var */ .
an $this, array(); an $this, array(); an $this, array();
global but 'fields' global but 'fields' global but 'fields'
1, 'ES null 1, 'ES null 1, 'ES null
class * ' class * ' class * '
true, /* !isset( true, /* !isset( true, /* !isset(
document 'analyzed', / document 'analyzed', / document 'analyzed', /
analyzer unset( 'tokenizer' analyzer unset( 'tokenizer' analyzer unset( 'tokenizer'
case $args, 'string', case $args, 'string', case $args, 'string',
extends !== switch extends !== switch extends !== switch
wp_parse_args( //no the wp_parse_args( //no the wp_parse_args( //no the
by else else by else else by else else