| @@ -47,28 +47,24 @@ | ||
| 47 | 47 | 'analysis' => array( |
| 48 | 48 | 'analyzer' => array( |
| 49 | 49 | 'default' => array( |
| 50 | 50 | 'tokenizer' => 'standard', |
| 51 | - /** | |
| 52 | - * Filter Elasticsearch default analyzer's filters | |
| 53 | - * | |
| 54 | - * @since 3.6.2 | |
| 55 | - * @hook ep_default_analyzer_filters | |
| 56 | - * @param {array<string>} $filters Default filters | |
| 57 | - * @return {array<string>} New filters | |
| 58 | - */ | |
| 59 | - 'filter' => apply_filters( 'ep_default_analyzer_filters', array( 'standard', 'ewp_word_delimiter', 'lowercase', 'stop', 'ewp_snowball' ) ), | |
| 60 | - 'char_filter' => array( 'html_strip' ), | |
| 61 | - /** | |
| 62 | - * Filter Elasticsearch default language in mapping | |
| 63 | - * | |
| 64 | - * @hook ep_analyzer_language | |
| 65 | - * @param {string} $lang Default language | |
| 66 | - * @param {string} $lang_context Language context | |
| 67 | - * @return {string} New language | |
| 68 | - */ | |
| 51 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 52 | + 'filter' => apply_filters( 'ep_default_analyzer_filters', array( 'standard', 'ewp_word_delimiter', 'lowercase', 'ep_stop', 'ewp_snowball', 'ep_asciifolding' ) ), | |
| 53 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 54 | + 'char_filter' => apply_filters( 'ep_default_analyzer_char_filters', array( 'html_strip' ) ), | |
| 55 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 69 | 56 | 'language' => apply_filters( 'ep_analyzer_language', 'english', 'analyzer_default' ), |
| 70 | 57 | ), |
| 58 | + 'default_search' => array( | |
| 59 | + 'tokenizer' => 'standard', | |
| 60 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 61 | + 'filter' => apply_filters( 'ep_default_search_analyzer_filters', array( 'standard', 'lowercase', 'ep_stop', 'ewp_snowball', 'ep_asciifolding' ) ), | |
| 62 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 63 | + 'char_filter' => apply_filters( 'ep_default_search_analyzer_char_filters', array( 'html_strip' ) ), | |
| 64 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 65 | + 'language' => apply_filters( 'ep_analyzer_language', 'english', 'analyzer_default' ), | |
| 66 | + ), | |
| 71 | 67 | 'shingle_analyzer' => array( |
| 72 | 68 | 'type' => 'custom', |
| 73 | 69 | 'tokenizer' => 'standard', |
| 74 | 70 | 'filter' => array( 'lowercase', 'shingle_filter' ), |
| @@ -90,16 +86,9 @@ | ||
| 90 | 86 | 'preserve_original' => true, |
| 91 | 87 | ), |
| 92 | 88 | 'ewp_snowball' => array( |
| 93 | 89 | 'type' => 'snowball', |
| 94 | - /** | |
| 95 | - * Filter Elasticsearch default language in mapping | |
| 96 | - * | |
| 97 | - * @hook ep_analyzer_language | |
| 98 | - * @param {string} $lang Default language | |
| 99 | - * @param {string} $lang_context Language context | |
| 100 | - * @return {string} New language | |
| 101 | - */ | |
| 90 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 102 | 91 | 'language' => apply_filters( 'ep_analyzer_language', 'english', 'filter_ewp_snowball' ), |
| 103 | 92 | ), |
| 104 | 93 | 'edge_ngram' => array( |
| 105 | 94 | 'side' => 'front', |
| @@ -106,8 +95,18 @@ | ||
| 106 | 95 | 'max_gram' => 10, |
| 107 | 96 | 'min_gram' => 3, |
| 108 | 97 | 'type' => 'edgeNGram', |
| 109 | 98 | ), |
| 99 | + 'ep_stop' => [ | |
| 100 | + 'type' => 'stop', | |
| 101 | + 'ignore_case' => true, | |
| 102 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 103 | + 'stopwords' => apply_filters( 'ep_analyzer_language', 'english', 'filter_ep_stop' ), | |
| 104 | + ], | |
| 105 | + 'ep_asciifolding' => [ | |
| 106 | + 'type' => 'asciifolding', | |
| 107 | + 'preserve_original' => true, | |
| 108 | + ], | |
| 110 | 109 | ), |
| 111 | 110 | 'normalizer' => array( |
| 112 | 111 | 'lowerasciinormalizer' => array( |
| 113 | 112 | 'type' => 'custom', |
| @@ -424,8 +423,11 @@ | ||
| 424 | 423 | 'ID' => array( |
| 425 | 424 | 'type' => 'long', |
| 426 | 425 | ), |
| 427 | 426 | 'src' => array( |
| 427 | + 'type' => 'text', | |
| 428 | + ), | |
| 429 | + 'srcset' => array( | |
| 428 | 430 | 'type' => 'text', |
| 429 | 431 | ), |
| 430 | 432 | 'width' => array( |
| 431 | 433 | 'type' => 'integer', |