Guida alla migrazione
Questa guida alla migrazione è progettata per aiutare nella transizione da SearchWP 3.x (e versioni precedenti) a SearchWP 4.
Nota: la tua chiave di licenza è la stessa sia per SearchWP 3.x che per SearchWP 4
Nota: SearchWP 4 è una release maggiore che interrompe la compatibilità con le versioni precedenti
(ad eccezione di SWP_Query, che non è stato modificato)
Poiché si tratta di una release di versione maggiore che ha interrotto la compatibilità con le versioni precedenti, è fortemente raccomandato che una migrazione venga prima eseguita su un server di staging per garantire che il processo proceda senza intoppi prima che la migrazione venga eseguita su un server di produzione.
Nota: i motori, le impostazioni, le parole vuote e i sinonimi di SearchWP 3 verranno migrati al momento dell'attivazione di SearchWP 4.
Il processo di migrazione può essere suddiviso nei seguenti passaggi che dovrai intraprendere:
- Revisionare completamente questa guida alla migrazione.
- Assicurarsi che tutte le estensioni installate siano state aggiornate alle loro ultime versioni.
- Auditing all hooks in use both in your theme and any custom plugins.
- Updating all existing hooks to SearchWP 4 equivalents, reaching out to support if any problems arise.
Nota: si prega di consultare la documentazione per tutti gli hook poiché alcuni parametri sono cambiati!
- Updating all existing hooks to SearchWP 4 equivalents, reaching out to support if any problems arise.
- Scaricare SearchWP 4 dal tuo Account.
- Disattivare e disinstallare* (vedi nota sotto!) SearchWP 3.x dalla tua installazione di WordPress.
- Installare e attivare SearchWP 4.
- Automatic migration of settings from SearchWP 3.x to SearchWP 4 upon activation.
Nota: i pesi di rilevanza degli attributi ora hanno tre segmenti e il cursore dei pesi visualizzerà il segmento di peso più vicino. Questo potrebbe apparire diverso se hai personalizzato i pesi, ma i pesi effettivi di v3 verranno mantenuti finché non verranno modificati e i motori non verranno risalvati.
- Costruire l'indice iniziale di SearchWP 4.
- Testare la funzionalità.
* Se hai selezionato la casella di controllo per rimuovere tutti i dati di SearchWP alla disinstallazione, i tuoi dati verranno eliminati. Deseleziona la casella di controllo se necessario.
Se la casella di controllo non è selezionata e non stai utilizzando l'hook searchwp_nuke_on_delete per abilitare la funzionalità, tutti i tuoi dati di SearchWP rimarranno intatti e utilizzabili qualora decidessi di reinstallare SearchWP 3.x in qualsiasi momento.
Hook
Una delle modifiche che interrompono la compatibilità da SearchWP 3.x a SearchWP 4 è che tutti gli hook sono stati rinominati. Alcuni hook sono stati rinominati ma altrimenti funzionano allo stesso modo. Altri hook sono stati completamente rimossi.
Si prega di rivedere tutti i propri hook durante l'aggiornamento dei tag consultando la documentazione per ciascuno. Alcuni potrebbero essere un semplice cambio di tag, altri un semplice cambio di parametro, ma alcuni hook superflui in v3 sono stati rimossi a favore di un nuovo hook più adatto. Si prega di testare individualmente ciascuno dei propri hook. ?
C'è una tabella di riferimento degli hook disponibile di seguito.
Modifiche da SearchWP 3
L'indice e l'indicizzatore di SearchWP sono stati completamente ricostruiti, incluso il processo in background. Detto questo, c'è parità di funzionalità tra entrambe le versioni. Operano in modi simili nel complesso, ma ci sono alcune modifiche (significative) di cui dovresti essere a conoscenza.
Media Parents
In SearchWP quando il trasferimento/attribuzione del peso del genitore era abilitato, i Media senza genitore venivano omessi dai risultati. SearchWP 4 ora restituisce tali risultati in modo che non vengano persi.
Se preferisci che i Media senza genitore (quando il trasferimento del peso del genitore è abilitato) vengano eliminati dal set di risultati, puoi usare questo hook:
| <?php | |
| // Tell SearchWP to drop Media with no parent when Parent Attribution has been enabled. | |
| // This was the default behavior in SearchWP 3 but has changed in SearchWP 4. | |
| add_filter( 'searchwp\source\post\attachment\parent_attribution\strict', '__return_true' ); |
Termini della Tassonomia
In SearchWP 3 solo term_name veniva indicizzato per impostazione predefinita. Sulla base del feedback dei clienti, questo comportamento è cambiato per includere l'intero oggetto WP_Term, che include lo slug, la description e altri dati associati a ciascun WP_Term che SearchWP indicizza.
Se desideri invertire questo comportamento, questo snippet farà proprio questo: https://gist.github.com/jchristopher/0ecc4c6ed172f64e7a97748026266e32
Installazione
SearchWP 4 è una release principale che è anche una riscrittura completa di SearchWP 3.x. Le modifiche associate richiedono che SearchWP 3.x venga sia disattivato che eliminato prima di installare SearchWP 4.
Si raccomanda che SearchWP 3.x venga eliminato utilizzando la pagina Plugin nella tua installazione di WordPress dopo che è stato disattivato.
Nota: C'è un'impostazione nella scheda Avanzate della schermata delle impostazioni di SearchWP 3.x che, quando selezionata, rimuoverà permanentemente tutti i dati di SearchWP all'installazione. C'è anche un hook: searchwp_nuke_on_delete.
Se non vuoi che i tuoi dati vengano eliminati alla disinstallazione, assicurati che sia la casella di controllo sia deselezionata sia l'hook assente.
A meno che tu non abbia scelto di far rimuovere permanentemente i tuoi dati di SearchWP 3.x alla cancellazione del plugin, il tuo indice e le impostazioni di SearchWP 3.x rimarranno intatti durante questo processo e saranno disponibili qualora decidessi di tornare a SearchWP 3.x in qualsiasi momento.
Se dopo l'aggiornamento desideri rimuovere permanentemente i dati di SearchWP 3.x (mantenendo i tuoi dati di SearchWP 4) puoi usare questa Estensione: Rimozione Dati Legacy.
Impostazioni
Quando attivato, SearchWP 4 rileverà, migrerà e importerà tutte le tue impostazioni esistenti, ad es. la configurazione del motore.
Il tuo indice esistente non verrà migrato direttamente poiché il formato è cambiato significativamente. Alla attivazione SearchWP 4 inizierà a ricostruire il tuo indice utilizzando i tuoi motori migrati. Una volta che l'indice è stato creato, la tua migrazione è completa!
Dovresti testare alcune ricerche per assicurarti della funzionalità e, in caso di problemi, apri un ticket di supporto il prima possibile.
Nota bene che a meno che tu non abbia scelto di rimuovere i tuoi dati di SearchWP 3.x, questi sono ancora disponibili rimuovendo completamente SearchWP 4 e reinstallando SearchWP 3.x. Un link per il download sarà sempre disponibile nel tuo Account.
Riferimento Migrazione Hook
| SearchWP 3.x | SearchWP 4 |
|---|---|
| Azioni | |
searchwp_after_query_index |
searchwp\query\after |
searchwp_before_query_index |
searchwp\query\before |
searchwp_index_initial_complete |
searchwp\indexer\complete |
searchwp_index_pdf_metadata |
searchwp\document\pdf_metadata\skip |
searchwp_index_post |
searchwp\index\add |
searchwp_index_up_to_date |
N/A |
searchwp_indexer_loopback |
N/A |
searchwp_indexer_post_chunk |
searchwp\indexer\batch |
searchwp_indexer_posts |
searchwp\indexer\has_updates |
searchwp_indexer_pre |
searchwp\indexer\init |
searchwp_indexer_pre_chunk |
searchwp\indexer\batch |
searchwp_indexer_pre_get_comments |
N/A |
searchwp_indexer_running |
searchwp\process\begin |
searchwp_load |
searchwp\init |
searchwp_loaded |
searchwp\loaded |
searchwp_log |
searchwp\debug\log |
searchwp_revised_search_query |
searchwp\query\ran |
searchwp_settings_after_header |
searchwp\settings\header\after |
searchwp_settings_after\{$view} |
searchwp\settings\after\{$view} |
searchwp_settings_before_header |
searchwp\settings\header\before |
searchwp_settings_before\{$view} |
searchwp\settings\before\{$view} |
searchwp_settings_engines |
searchwp\settings\view\default |
searchwp_settings_footer |
searchwp\settings\footer |
searchwp_settings_init |
searchwp\settings\init |
searchwp_settings_nav_tab |
searchwp\settings\nav\tab |
searchwp_settings_view\{$view} |
searchwp\settings\view\{$view} |
searchwp_dashboard_widget |
searchwp\admin\dashboard_widgets\statistics |
searchwp_swp_query_shutdown |
searchwp\swp_query\shutdown |
| Filtri Generali | |
searchwp_admin_bar |
searchwp\admin_bar |
searchwp_dashboard_widget_cap |
searchwp\statistics\capability |
searchwp_debug |
searchwp\debug |
searchwp_debug_detailed |
N/A |
searchwp_debug_include_pid |
N/A |
searchwp_extensions |
searchwp\extensions |
searchwp_failed_index_notice |
N/A |
searchwp_init |
searchwp\loaded |
searchwp_initial_engine_settings |
searchwp\install\engine\settings |
searchwp_license_key |
searchwp\license\key |
searchwp_locale_override |
locale |
searchwp_missing_integration_notices |
searchwp\missing_integration_notices |
searchwp_nuke_on_delete |
searchwp\nuke_on_delete |
searchwp_settings_cap |
searchwp\settings\capability |
searchwp_show_conflict_notices |
N/A |
searchwp_show_filter_conflict_notices |
N/A |
searchwp_skip_vendor_libs |
N/A |
searchwp_statistics_cap |
searchwp\statistics\capability |
searchwp_statistics_popular_days_{$days} |
searchwp\statistics\popular\days_{$days} |
| Indicizzatore | |
searchwp_aggressive_delta_update |
searchwp\index\aggressive_delta |
searchwp_alternate_indexer |
searchwp\indexer\alternate |
searchwp_auto_reindex |
searchwp\index\process\enabled e searchwp\indexer\paused |
searchwp_background_deltas |
searchwp\index\process\enabled |
searchwp_basic_auth_creds |
searchwp\indexer\http_basic_auth_credentials |
searchwp_custom_field_{$key} |
searchwp\source\post\attributes\meta\{$key} |
searchwp_custom_fields |
searchwp\source\post\attributes\meta |
searchwp_custom_stemmer |
searchwp\stemmer\custom |
searchwp_do_blocks |
searchwp\source\post\attributes\content\do_blocks |
searchwp_do_shortcode |
searchwp\source\post\attributes\content\do_shortcodes |
searchwp_endpoint |
N/A |
searchwp_exclude_common |
N/A |
searchwp_excluded_custom_fields |
searchwp\source\post\attributes\meta\ignored |
searchwp_exclusive_regex_matches |
searchwp\tokens\tokenize_pattern_matches |
searchwp_external_pdf_processing |
searchwp\parser\pdf |
searchwp_extra_metadata |
N/A vedi Articolo KB |
searchwp_get_custom_fields |
N/A |
searchwp_include_comment_author |
searchwp\source\post\attributes\comments\author |
searchwp_include_comment_email |
searchwp\source\post\attributes\comments\email |
searchwp_index_attachments |
N/A |
searchwp_index_chunk_size |
searchwp\indexer\batch_size |
searchwp_index_comments |
N/A |
searchwp_index_emoji |
searchwp\allow_emoji |
searchwp_indexed_post_types |
Equivalente parziale: searchwp\sources |
searchwp_indexer_additional_meta_exclusions |
N/A |
searchwp_indexer_apply_engines_rules |
N/A |
searchwp_indexer_comment |
searchwp\source\post\attributes\comment |
searchwp_indexer_comments_args |
searchwp\source\post\attributes\comments\args |
searchwp_indexer_enabled |
N/A |
searchwp_indexer_excluded_by_rules |
N/A |
searchwp_indexer_load_monitoring |
N/A |
searchwp_indexer_loopback_args |
searchwp\indexer\loopback\args |
searchwp_indexer_max_attempts |
N/A |
searchwp_indexer_paused |
N/A |
searchwp_indexer_pre_process_content |
searchwp\source\post\attributes\content |
searchwp_indexer_tag_attributes |
searchwp\valid_html_tags |
searchwp_indexer_taxonomies |
N/A |
searchwp_indexer_taxonomy_term |
searchwp\source\post\attributes\taxonomy\term |
searchwp_indexer_taxonomy_term_index_slug |
N/A |
searchwp_indexer_taxonomy_terms |
searchwp\source\post\attributes\taxonomy\terms |
searchwp_indexer_throttle |
N/A |
searchwp_indexer_unindexed_args |
searchwp\post__insearchwp\post__not_in |
searchwp_indexer_unindexed_media_args |
searchwp\post__insearchwp\post__not_in |
searchwp_is_attribute_used |
N/A |
searchwp_is_used_meta_key |
N/A |
searchwp_is_used_taxonomy |
N/A |
searchwp_keyword_stem_locale |
N/A |
searchwp_lenient_accents |
searchwp\tokens\strict |
searchwp_lenient_accent_result |
searchwp\tokens\removed_accents |
searchwp_lenient_accents_conversions |
N/A |
searchwp_load_maximum |
N/A |
searchwp_max_delta_attempts |
N/A |
searchwp_max_index_attempts |
N/A |
searchwp_mimes_{$mime_type_group} |
N/A |
searchwp_minimum_word_length |
searchwp\tokens\minimum_length |
searchwp_omit_document_processing |
N/A |
searchwp_omit_meta_key |
N/A |
searchwp_omit_meta_key_{$custom_field_key} |
N/A |
searchwp_omit_wp_metadata |
N/A |
searchwp_pdf_metadata |
N/A |
searchwp_pdf_spaces_to_content_percentage |
N/A |
searchwp_post_statuses |
searchwp\post_stati |
searchwp_pre_set_post |
N/A |
searchwp_prevent_indexing |
searchwp\post__not_in |
searchwp_process_term_limit |
searchwp\index\tokens_max |
searchwp_remove_pre_get_posts |
N/A |
searchwp_sanitize_terms |
N/A |
searchwp_set_post |
N/A |
searchwp_stopwords |
searchwp\stopwords |
searchwp_term_count_limit |
searchwp\index\tokens_max |
searchwp_term_pattern_whitelist |
searchwp\tokens\regex_patterns |
searchwp_timeout |
searchwp\indexer\loopback\args |
| Filtri di query | |
searchwp_allow_quoted_phrase_search |
searchwp\query\logic\phrase |
searchwp_and_fields |
N/A |
searchwp_and_fields_{$post_type} |
N/A |
searchwp_and_logic |
searchwp\query\logic\and |
searchwp_and_logic_only |
searchwp\query\logic\and\strict |
searchwp_auto_output_revised_search_query |
searchwp\query\output_suggested_search |
searchwp_big_selects |
N/A |
searchwp_custom_field_keys |
searchwp\source\attribute\options |
searchwp_debug_append_weights_to_titles |
N/A |
searchwp_disable_impose_engine_config |
N/A |
searchwp_do_suggestions |
searchwp\query\partial_matches\did_you_mean |
searchwp_enable_attribution_{post_type} |
searchwp\source\post\{$post_type}\attribution |
searchwp_enable_parent_attribution_{post_type} |
searchwp\source\post\{$post_type}\parent_attribution |
searchwp_engine_settings_{engine} |
N/A |
searchwp_exclude |
searchwp\post__not_in |
searchwp_exclude_common |
N/A |
searchwp_force_run |
N/A |
searchwp_force_wp_query |
N/A |
searchwp_force_wpquery_order |
N/A |
searchwp_found_post_objects |
N/A |
searchwp_fuzzy_digit_threshold |
N/A |
searchwp_fuzzy_min_length |
searchwp\query\partial_matches\fuzzy\minimum_length |
searchwp_fuzzy_threshold |
searchwp\query\partial_matches\fuzzy\threshold |
searchwp_in_admin |
N/A |
searchwp_include |
searchwp\post__in |
searchwp_like_min_length |
searchwp\query\partial_matches\minimum_length |
searchwp_like_stem |
N/A |
searchwp_like_wildcard_after |
searchwp\query\partial_matches\wildcard_after |
searchwp_like_wildcard_before |
searchwp\query\partial_matches\wildcard_before |
searchwp_load_posts |
N/A |
searchwp_log_search |
searchwp\statistics\log |
searchwp_max_and_results |
N/A |
searchwp_max_search_terms |
searchwp\query\tokens\limit |
searchwp_max_search_terms_{$engine} |
N/A |
searchwp_max_search_terms_supplemental |
N/A |
searchwp_partial_matches_force_fuzzy |
searchwp\query\partial_matches\force_fuzzy |
searchwp_partial_matches_lenient |
searchwp\query\partial_matches\force |
searchwp_partial_matching_{$engine} |
N/A |
searchwp_persist_extra_metadata |
N/A |
searchwp_posts_per_page |
searchwp\query\per_page |
searchwp_pre_search_terms |
searchwp\query\tokens |
searchwp_query_allow_query_string_override_order |
searchwp\query\mods |
searchwp_query_allow_query_string_override_orderby |
searchwp\query\mods |
searchwp_query_conditions |
searchwp\query\mods |
searchwp_query_join |
searchwp\query\mods |
searchwp_query_limit_start |
searchwp\query\mods |
searchwp_query_limit_total |
searchwp\query\mods |
searchwp_query_main_join |
searchwp\query\mods |
searchwp_query_offset |
searchwp\query\mods |
searchwp_query_orderby |
searchwp\query\mods |
searchwp_query_results |
searchwp\query\results |
searchwp_query_select_inject |
searchwp\query\mods |
searchwp_refine_and_results |
N/A |
searchwp_remove_pre_get_posts_during_search |
N/A |
searchwp_results |
searchwp\query\results |
searchwp_return_orderby_date |
searchwp\query\mods |
searchwp_return_orderby_random |
searchwp\query\mods |
searchwp_search_args |
searchwp\query\args |
searchwp_search_query_order |
searchwp\query\mods |
searchwp_short_circuit |
searchwp\native\short_circuit |
searchwp_swp_query_post__in_explicit |
N/A |
searchwp_swp_query_post__not_in_explicit |
N/A |
searchwp_term_in |
searchwp\query\tokens |
searchwp_terms |
searchwp\query\search_string |
searchwp_weight_max |
N/A |
searchwp_weight_mods |
searchwp\query\mods |
searchwp_weight_threshold |
searchwp\query\min_relevance |
searchwp_where |
searchwp\query\mods |
| Elaborazione documenti | |
searchwp_file_content_limit |
searchwp\source\attachment\attribute\document_content\display_limit |
searchwp_purge_document_content |
Vedi snippet |
| Evidenziazione | |
searchwp_term_highlight_break_on_first_match |
N/A |
searchwp_term_highlight_occurrence |
N/A |
searchwp_th_auto_filter_excerpt |
N/A |
searchwp_th_auto_highlight_content |
N/A |
searchwp_th_do_shortcode |
N/A |
searchwp_th_excluded_engines |
N/A |
searchwp_th_num_words |
N/A |
searchwp_th_partial_matches |
N/A |
searchwp_th_password_required_message |
N/A |
searchwp_th_pre_process_content |
N/A |
searchwp_th_pre_process_meta_value |
N/A |
searchwp_th_strip_shortcodes |
N/A |
searchwp_th_use_span |
N/A |
| Interfaccia utente delle impostazioni | |
searchwp_engine_content_type_label |
searchwp\source\attribute\label |

