Skip to content

Commit

Permalink
Update default config for directory search index to include title fie…
Browse files Browse the repository at this point in the history
…ld as fulltext and html filter with default tag boosting.
  • Loading branch information
finnlewis committed Mar 12, 2024
1 parent d26bcc1 commit e9d586f
Show file tree
Hide file tree
Showing 2 changed files with 182 additions and 20 deletions.
123 changes: 120 additions & 3 deletions config/install/search_api.index.localgov_directories_index_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ dependencies:
- field.storage.node.localgov_directory_title_sort
- core.entity_view_mode.node.directory_index
module:
- search_api
- node
- search_api
id: localgov_directories_index_default
name: Directories
description: ''
description: 'Default search index for LocalGov Directories channel.'
read_only: false
field_settings:
rendered_item:
Expand Down Expand Up @@ -44,13 +44,130 @@ datasource_settings:
processor_settings:
add_url: { }
aggregated_field: { }
custom_value: { }
entity_status: { }
entity_type: { }
highlight:
weights:
postprocess_query: 0
prefix: '<strong>'
suffix: '</strong>'
excerpt: true
excerpt_always: false
excerpt_length: 256
exclude_fields: { }
highlight: always
highlight_partial: false
html_filter:
weights:
preprocess_index: -15
preprocess_query: -15
all_fields: false
fields:
- rendered_item
- title
title: true
alt: true
tags:
b: 2
h1: 5
h2: 3
h3: 2
strong: 2
ignorecase:
weights:
preprocess_index: -20
preprocess_query: -20
all_fields: true
fields:
- localgov_directory_channels
- localgov_directory_title_sort
- rendered_item
- title
language_with_fallback: { }
rendered_item: { }
stemmer:
weights:
preprocess_index: 0
preprocess_query: 0
all_fields: true
fields:
- rendered_item
- title
exceptions:
mexican: mexic
texan: texa
stopwords:
weights:
preprocess_index: -5
preprocess_query: -2
all_fields: true
fields:
- rendered_item
- title
stopwords:
- a
- an
- and
- are
- as
- at
- be
- but
- by
- for
- if
- in
- into
- is
- it
- 'no'
- not
- of
- 'on'
- or
- s
- such
- t
- that
- the
- their
- then
- there
- these
- they
- this
- to
- was
- will
- with
tokenizer:
weights:
preprocess_index: -6
preprocess_query: -6
all_fields: true
fields:
- rendered_item
- title
spaces: ''
ignored: ._-
overlap_cjk: 1
minimum_word_size: '3'
transliteration:
weights:
preprocess_index: -20
preprocess_query: -20
all_fields: true
fields:
- localgov_directory_channels
- localgov_directory_title_sort
- rendered_item
- title
tracker_settings:
default:
indexing_order: fifo
options:
index_directly: true
cron_limit: 50
index_directly: true
track_changes_in_references: true
server: NULL
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ dependencies:
- search_api.server.localgov_directories_default
- core.entity_view_mode.node.directory_index
module:
- search_api
- node
- search_api
id: localgov_directories_index_default
name: Directories
description: ''
description: 'Default search index for LocalGov Directories channel, installed by LocalGov Directories Database.'
read_only: false
field_settings:
localgov_directory_channels:
Expand Down Expand Up @@ -42,6 +42,14 @@ field_settings:
'entity:node':
localgov_directories_page: directory_index
node: directory_index
title:
label: Title
datasource_id: 'entity:node'
property_path: title
type: text
dependencies:
module:
- node
datasource_settings:
'entity:node':
bundles:
Expand All @@ -54,31 +62,67 @@ datasource_settings:
processor_settings:
add_url: { }
aggregated_field: { }
custom_value: { }
entity_status: { }
ignorecase:
all_fields: true
entity_type: { }
highlight:
weights:
postprocess_query: 0
prefix: '<strong>'
suffix: '</strong>'
excerpt: true
excerpt_always: false
excerpt_length: 256
exclude_fields: { }
highlight: always
highlight_partial: false
html_filter:
weights:
preprocess_index: -15
preprocess_query: -15
all_fields: false
fields:
- localgov_directory_title_sort
- rendered_item
- title
title: true
alt: true
tags:
b: 2
h1: 5
h2: 3
h3: 2
strong: 2
ignorecase:
weights:
preprocess_index: -20
preprocess_query: -20
all_fields: true
fields:
- localgov_directory_channels
- localgov_directory_title_sort
- rendered_item
- title
language_with_fallback: { }
rendered_item: { }
stemmer:
weights:
preprocess_index: 0
preprocess_query: 0
all_fields: true
fields:
- rendered_item
- title
exceptions:
mexican: mexic
texan: texa
weights:
preprocess_index: 0
preprocess_query: 0
stopwords:
weights:
preprocess_index: -5
preprocess_query: -2
all_fields: true
fields:
- rendered_item
- title
stopwords:
- a
- an
Expand Down Expand Up @@ -115,27 +159,28 @@ processor_settings:
- was
- will
- with
weights:
preprocess_index: -5
preprocess_query: -2
tokenizer:
weights:
preprocess_index: -6
preprocess_query: -6
all_fields: true
fields:
- rendered_item
- title
spaces: ''
ignored: ._-
overlap_cjk: 1
minimum_word_size: '3'
weights:
preprocess_index: -6
preprocess_query: -6
transliteration:
weights:
preprocess_index: -20
preprocess_query: -20
all_fields: true
fields:
- localgov_directory_channels
- localgov_directory_title_sort
- rendered_item
weights:
preprocess_index: -20
preprocess_query: -20
- title
tracker_settings:
default:
indexing_order: fifo
Expand Down

0 comments on commit e9d586f

Please sign in to comment.