Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add title field to fulltext index by default. #361

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 130 additions & 4 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 All @@ -25,6 +25,15 @@ field_settings:
'entity:node':
localgov_directories_page: directory_index
node: directory_index
title:
label: Title
datasource_id: 'entity:node'
property_path: title
boost: 5.0
type: text
dependencies:
module:
- node
datasource_settings:
'entity:node':
bundles:
Expand All @@ -36,13 +45,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
server: NULL
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,15 @@ field_settings:
'entity:node':
localgov_directories_page: directory_index
node: directory_index
title:
label: Title
datasource_id: 'entity:node'
property_path: title
boost: 5.0
type: text
dependencies:
module:
- node
datasource_settings:
'entity:node':
bundles:
Expand All @@ -54,31 +63,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 +160,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
Loading