| @@ -47,36 +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 | - /** | |
| 61 | - * Filter Elasticsearch default analyzer's char_filter | |
| 62 | - * | |
| 63 | - * @since 4.2.2 | |
| 64 | - * @hook ep_default_analyzer_char_filters | |
| 65 | - * @param {array<string>} $char_filters Default filter | |
| 66 | - * @return {array<string>} New filters | |
| 67 | - */ | |
| 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 */ | |
| 68 | 54 | 'char_filter' => apply_filters( 'ep_default_analyzer_char_filters', array( 'html_strip' ) ), |
| 69 | - /** | |
| 70 | - * Filter Elasticsearch default language in mapping | |
| 71 | - * | |
| 72 | - * @hook ep_analyzer_language | |
| 73 | - * @param {string} $lang Default language | |
| 74 | - * @param {string} $lang_context Language context | |
| 75 | - * @return {string} New language | |
| 76 | - */ | |
| 55 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 77 | 56 | 'language' => apply_filters( 'ep_analyzer_language', 'english', 'analyzer_default' ), |
| 78 | 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 | + ), | |
| 79 | 67 | 'shingle_analyzer' => array( |
| 80 | 68 | 'type' => 'custom', |
| 81 | 69 | 'tokenizer' => 'standard', |
| 82 | 70 | 'filter' => array( 'lowercase', 'shingle_filter' ), |
| @@ -98,16 +86,9 @@ | ||
| 98 | 86 | 'preserve_original' => true, |
| 99 | 87 | ), |
| 100 | 88 | 'ewp_snowball' => array( |
| 101 | 89 | 'type' => 'snowball', |
| 102 | - /** | |
| 103 | - * Filter Elasticsearch default language in mapping | |
| 104 | - * | |
| 105 | - * @hook ep_analyzer_language | |
| 106 | - * @param {string} $lang Default language | |
| 107 | - * @param {string} $lang_context Language context | |
| 108 | - * @return {string} New language | |
| 109 | - */ | |
| 90 | + /* This filter is documented in includes/mappings/post/7-0.php */ | |
| 110 | 91 | 'language' => apply_filters( 'ep_analyzer_language', 'english', 'filter_ewp_snowball' ), |
| 111 | 92 | ), |
| 112 | 93 | 'edge_ngram' => array( |
| 113 | 94 | 'side' => 'front', |
| @@ -114,8 +95,18 @@ | ||
| 114 | 95 | 'max_gram' => 10, |
| 115 | 96 | 'min_gram' => 3, |
| 116 | 97 | 'type' => 'edgeNGram', |
| 117 | 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 | + ], | |
| 118 | 109 | ), |
| 119 | 110 | 'normalizer' => array( |
| 120 | 111 | 'lowerasciinormalizer' => array( |
| 121 | 112 | 'type' => 'custom', |
| @@ -432,8 +423,11 @@ | ||
| 432 | 423 | 'ID' => array( |
| 433 | 424 | 'type' => 'long', |
| 434 | 425 | ), |
| 435 | 426 | 'src' => array( |
| 427 | + 'type' => 'text', | |
| 428 | + ), | |
| 429 | + 'srcset' => array( | |
| 436 | 430 | 'type' => 'text', |
| 437 | 431 | ), |
| 438 | 432 | 'width' => array( |
| 439 | 433 | 'type' => 'integer', |