From 08338ee3bd74502d08753daaba0b3def82812ba9 Mon Sep 17 00:00:00 2001 From: naomi Date: Thu, 31 Mar 2022 14:13:59 +0100 Subject: [PATCH] fixed bug with search index that came from deleting full_name base field --- config/search_api.index.opencase_actors.yml | 26 +-- config/views.view.actor_search.yml | 233 ++++++++++---------- 2 files changed, 126 insertions(+), 133 deletions(-) diff --git a/config/search_api.index.opencase_actors.yml b/config/search_api.index.opencase_actors.yml index 4cff7ca..e9c1430 100644 --- a/config/search_api.index.opencase_actors.yml +++ b/config/search_api.index.opencase_actors.yml @@ -2,11 +2,11 @@ uuid: 42f67f66-427a-4ad4-94d7-fc4030cb03dc langcode: en status: true dependencies: + config: + - search_api.server.opencase_server module: - opencase_entities - search_api - config: - - search_api.server.opencase_server _core: default_config_hash: s9NYpOvmdxpnBo0ToogG7_ayW0tI98Q6ND4qtkfxq-s id: opencase_actors @@ -22,14 +22,6 @@ field_settings: dependencies: module: - opencase_entities - full_name: - label: Name - datasource_id: 'entity:oc_actor' - property_path: full_name - type: text - dependencies: - module: - - opencase_entities last_name: label: 'Last Name' datasource_id: 'entity:oc_actor' @@ -64,23 +56,23 @@ datasource_settings: processor_settings: add_url: { } aggregated_field: { } + entity_type: { } ignorecase: - all_fields: true - fields: - - first_name - - full_name - - last_name - - name weights: preprocess_index: -20 preprocess_query: -20 + all_fields: true + fields: + - first_name + - last_name + - name language_with_fallback: { } rendered_item: { } tracker_settings: default: indexing_order: fifo options: - index_directly: true cron_limit: 50 + index_directly: true track_changes_in_references: true server: opencase_server diff --git a/config/views.view.actor_search.yml b/config/views.view.actor_search.yml index 1276a67..2a9efcd 100644 --- a/config/views.view.actor_search.yml +++ b/config/views.view.actor_search.yml @@ -19,96 +19,12 @@ base_table: search_api_index_opencase_actors base_field: search_api_id display: default: - display_plugin: default id: default display_title: Master + display_plugin: default position: 0 display_options: - access: - type: role - options: - role: - authenticated: authenticated - cache: - type: none - options: { } - query: - type: views_query - options: - bypass_access: false - skip_access: false - exposed_form: - type: input_required - options: - submit_button: Search - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - text_input_required_format: full_html - pager: - type: mini - options: - items_per_page: 50 - offset: 0 - id: 0 - total_pages: null - expose: - items_per_page: false - items_per_page_label: 'Items per page' - items_per_page_options: '5, 10, 25, 50' - items_per_page_options_all: false - items_per_page_options_all_label: '- All -' - offset: false - offset_label: Offset - tags: - previous: ‹‹ - next: ›› - style: - type: table - options: - grouping: { } - row_class: '' - default_row_class: true - override: true - sticky: false - caption: '' - summary: '' - description: '' - columns: - name: name - type: type - type_1: type_1 - name_1: name_1 - info: - name: - sortable: false - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: '' - type: - align: '' - separator: '' - empty_column: false - responsive: '' - type_1: - align: '' - separator: '' - empty_column: false - responsive: '' - name_1: - align: '' - separator: '' - empty_column: false - responsive: '' - default: '-1' - empty_table: false - row: - type: fields + title: 'Search Results' fields: name: id: name @@ -117,6 +33,7 @@ display: relationship: none group_type: group admin_label: '' + plugin_id: search_api_field label: 'Organisation name ' exclude: true alter: @@ -179,7 +96,6 @@ display: use_highlighting: false multi_type: separator multi_separator: ', ' - plugin_id: search_api_field name_1: id: name_1 table: search_api_datasource_opencase_actors_entity_oc_actor @@ -187,6 +103,8 @@ display: relationship: none group_type: group admin_label: '' + entity_type: oc_actor + plugin_id: search_api_field label: Name exclude: false alter: @@ -249,8 +167,6 @@ display: use_highlighting: false multi_type: separator multi_separator: ', ' - entity_type: oc_actor - plugin_id: search_api_field type: id: type table: search_api_datasource_opencase_actors_entity_oc_actor @@ -258,6 +174,8 @@ display: relationship: none group_type: group admin_label: '' + entity_type: oc_actor + plugin_id: search_api_field label: 'Person type' exclude: true alter: @@ -323,8 +241,6 @@ display: display_methods: oc_actor_type: display_method: label - entity_type: oc_actor - plugin_id: search_api_field type_1: id: type_1 table: search_api_datasource_opencase_actors_entity_oc_organisation @@ -332,6 +248,8 @@ display: relationship: none group_type: group admin_label: '' + entity_type: oc_organisation + plugin_id: search_api_field label: Type exclude: false alter: @@ -397,8 +315,59 @@ display: display_methods: oc_organisation_type: display_method: label - entity_type: oc_organisation - plugin_id: search_api_field + pager: + type: mini + options: + offset: 0 + items_per_page: 50 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: input_required + options: + submit_button: Search + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + text_input_required_format: full_html + access: + type: role + options: + role: + authenticated: authenticated + cache: + type: none + options: { } + empty: { } + sorts: + search_api_relevance: + id: search_api_relevance + table: search_api_index_opencase_actors + field: search_api_relevance + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: DESC + expose: + label: '' + field_identifier: search_api_relevance + exposed: false + arguments: { } filters: search_api_fulltext: id: search_api_fulltext @@ -407,6 +376,7 @@ display: relationship: none group_type: group admin_label: '' + plugin_id: search_api_fulltext operator: and value: '' group: 1 @@ -417,6 +387,8 @@ display: description: 'Type at least 3 letters and press enter.' use_operator: false operator: search_api_fulltext_op + operator_limit_selection: false + operator_list: { } identifier: search_api_fulltext required: false remember: false @@ -427,8 +399,6 @@ display: administrator: '0' standard_user: '0' placeholder: '' - operator_limit_selection: false - operator_list: { } is_grouped: false group_info: label: '' @@ -444,28 +414,59 @@ display: parse_mode: terms min_length: 3 fields: { } - plugin_id: search_api_fulltext - sorts: - search_api_relevance: - id: search_api_relevance - table: search_api_index_opencase_actors - field: search_api_relevance - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - plugin_id: search_api - title: 'Search Results' + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + name: name + type: type + type_1: type_1 + name_1: name_1 + default: '-1' + info: + name: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + type: + align: '' + separator: '' + empty_column: false + responsive: '' + type_1: + align: '' + separator: '' + empty_column: false + responsive: '' + name_1: + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: fields + query: + type: views_query + options: + bypass_access: false + skip_access: false + relationships: { } + use_ajax: true header: { } footer: { } - empty: { } - relationships: { } - arguments: { } display_extenders: { } - use_ajax: true cache_metadata: max-age: -1 contexts: @@ -477,14 +478,14 @@ display: tags: - 'config:search_api.index.opencase_actors' page_1: - display_plugin: page id: page_1 display_title: Page + display_plugin: page position: 1 display_options: + exposed_block: true display_extenders: { } path: actor-search - exposed_block: true cache_metadata: max-age: -1 contexts: