Skip to content

Commit

Permalink
Full text search use taxonmy terms as well
Browse files Browse the repository at this point in the history
use function, should use synomyns (to be double checked, may be add field synomym :entity ratehr than synonym ) ;same for topics. Relate to NEUBIAS#137
  • Loading branch information
PerrineGilloteaux committed Jun 18, 2020
1 parent 7727166 commit 9acabf8
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 94 deletions.
3 changes: 2 additions & 1 deletion config/sync/core.entity_view_display.user.user.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ content:
third_party_settings: { }
label: inline
region: content
hidden: { }
hidden:
search_api_excerpt: true
235 changes: 142 additions & 93 deletions config/sync/search_api.index.default_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,29 @@ uuid: 5cc640c8-9e35-478f-b084-cb7d509c570b
langcode: en
status: true
dependencies:
module:
- node
- user
- taxonomy
- search_api
config:
- field.storage.node.field_tags
- field.storage.node.field_free_tagging
- field.storage.node.body
- field.storage.node.field_has_function
- field.storage.taxonomy_term.field_synonyms
- field.storage.node.field_has_topic
- field.storage.node.field_free_tagging
- field.storage.node.field_tags
- field.storage.user.field_first_name
- field.storage.user.field_name
- search_api.server.default_server
- core.entity_view_mode.node.search_index
module:
- node
- user
- taxonomy
- search_api
_core:
default_config_hash: CeQvQFFCLtBV14W1topZP19nFUlS3bSckwuryffgkgk
id: default_index
name: 'Default content index'
description: 'Default content index created by the Database Search Defaults module'
read_only: false
field_settings:
rendered_item:
label: 'Rendered item'
property_path: rendered_item
type: text
configuration:
roles:
anonymous: anonymous
view_mode:
'entity:node':
article: search_index
page: search_index
node_grants:
label: 'Node access information'
property_path: search_api_node_grants
type: string
indexed_locked: true
type_locked: true
hidden: true
title:
label: Title
datasource_id: 'entity:node'
property_path: title
type: text
boost: !!float 2
dependencies:
module:
- node
status:
label: 'Publishing status'
datasource_id: 'entity:node'
property_path: status
type: boolean
indexed_locked: true
type_locked: true
dependencies:
module:
- node
field_tags:
label: Tags
datasource_id: 'entity:node'
property_path: field_tags
type: text
dependencies:
config:
- field.storage.node.field_tags
author:
label: 'Author name'
datasource_id: 'entity:node'
Expand All @@ -78,24 +34,22 @@ field_settings:
module:
- node
- user
uid:
label: 'Author ID'
datasource_id: 'entity:node'
property_path: uid
type: integer
indexed_locked: true
type_locked: true
field_first_name:
label: 'First name'
datasource_id: 'entity:user'
property_path: field_first_name
type: text
dependencies:
module:
- node
format:
label: 'Body » Text format'
config:
- field.storage.user.field_first_name
field_free_tagging:
label: 'Additional keywords'
datasource_id: 'entity:node'
property_path: 'body:format'
property_path: field_free_tagging
type: text
dependencies:
config:
- field.storage.node.body
- field.storage.node.field_free_tagging
field_has_function:
label: 'has function'
datasource_id: 'entity:node'
Expand All @@ -114,22 +68,52 @@ field_settings:
dependencies:
config:
- field.storage.node.field_has_topic
processed:
label: 'Body » Processed text'
field_name:
label: 'Name (true name)'
datasource_id: 'entity:user'
property_path: field_name
type: text
dependencies:
config:
- field.storage.user.field_name
field_synonyms:
label: 'has function » Taxonomy term » Synonyms'
datasource_id: 'entity:node'
property_path: 'body:processed'
property_path: 'field_has_function:entity:field_synonyms'
type: text
dependencies:
config:
- field.storage.node.body
field_free_tagging:
label: 'Additional keywords'
- field.storage.node.field_has_function
- field.storage.taxonomy_term.field_synonyms
module:
- taxonomy
field_synonyms_1:
label: 'has topic » Taxonomy term » Synonyms'
datasource_id: 'entity:node'
property_path: field_free_tagging
property_path: 'field_has_topic:entity:field_synonyms'
type: text
dependencies:
config:
- field.storage.node.field_free_tagging
- field.storage.node.field_has_topic
- field.storage.taxonomy_term.field_synonyms
module:
- taxonomy
field_tags:
label: Tags
datasource_id: 'entity:node'
property_path: field_tags
type: text
dependencies:
config:
- field.storage.node.field_tags
format:
label: 'Body » Text format'
datasource_id: 'entity:node'
property_path: 'body:format'
type: text
dependencies:
config:
- field.storage.node.body
name:
label: Name
datasource_id: 'entity:taxonomy_term'
Expand All @@ -138,22 +122,83 @@ field_settings:
dependencies:
module:
- taxonomy
field_first_name:
label: 'First name'
datasource_id: 'entity:user'
property_path: field_first_name
name_function:
label: 'has function » Taxonomy term » Name'
datasource_id: 'entity:node'
property_path: 'field_has_function:entity:name'
type: text
boost: !!float 2
dependencies:
config:
- field.storage.user.field_first_name
field_name:
label: 'Name (true name)'
datasource_id: 'entity:user'
property_path: field_name
- field.storage.node.field_has_function
module:
- taxonomy
name_topic:
label: 'has topic » Taxonomy term » Name'
datasource_id: 'entity:node'
property_path: 'field_has_topic:entity:name'
type: text
boost: !!float 2
dependencies:
config:
- field.storage.user.field_name
- field.storage.node.field_has_topic
module:
- taxonomy
node_grants:
label: 'Node access information'
property_path: search_api_node_grants
type: string
indexed_locked: true
type_locked: true
hidden: true
processed:
label: 'Body » Processed text'
datasource_id: 'entity:node'
property_path: 'body:processed'
type: text
dependencies:
config:
- field.storage.node.body
rendered_item:
label: 'Rendered item'
property_path: rendered_item
type: text
configuration:
roles:
anonymous: anonymous
view_mode:
'entity:node':
article: search_index
page: search_index
status:
label: 'Publishing status'
datasource_id: 'entity:node'
property_path: status
type: boolean
indexed_locked: true
type_locked: true
dependencies:
module:
- node
title:
label: Title
datasource_id: 'entity:node'
property_path: title
type: text
boost: !!float 2
dependencies:
module:
- node
uid:
label: 'Author ID'
datasource_id: 'entity:node'
property_path: uid
type: integer
indexed_locked: true
type_locked: true
dependencies:
module:
- node
datasource_settings:
'entity:node':
bundles:
Expand Down Expand Up @@ -204,11 +249,11 @@ processor_settings:
title: true
alt: true
tags:
b: 2
h1: 5
h2: 3
h3: 2
string: 2
b: 2
weights:
preprocess_index: -3
preprocess_query: -6
Expand All @@ -230,8 +275,8 @@ processor_settings:
fields:
- rendered_item
exceptions:
texan: texa
mexican: mexic
texan: texa
weights:
preprocess_index: 0
preprocess_query: 0
Expand Down Expand Up @@ -281,18 +326,22 @@ processor_settings:
tokenizer:
all_fields: true
fields:
- rendered_item
- title
- field_tags
- author
- format
- field_first_name
- field_free_tagging
- field_has_function
- field_has_topic
- processed
- field_free_tagging
- name
- field_first_name
- field_name
- field_synonyms
- field_synonyms_1
- field_tags
- format
- name
- name_function
- name_topic
- processed
- rendered_item
- title
spaces: ''
overlap_cjk: 1
minimum_word_size: '3'
Expand Down

0 comments on commit 9acabf8

Please sign in to comment.