Add option to exclude certain pages from quant search index

Created on 10 September 2022, about 2 years ago
Updated 21 January 2024, 10 months ago

Problem/Motivation

Search results will show any content that is published and has a content type that's enabled. Sometimes there is content that we don't want to show up that is an indexed content type but there is no way to exclude these pages.

Steps to reproduce

  1. For a quant project that has search enabled
  2. Enable quant_search module
  3. Go to API tab and configure
  4. Go to Search tab
  5. Go to Pages sub-tab
  6. Click Add Quant search page button
  7. Fill in Label, Title and Route, and check inEnabled
  8. Go to the search page route
  9. Results: All indexed content is shown
  10. Expected Results: Pages that has been marked as excluded from index are not shown

Proposed resolution

From @stooit via Slack:

If you include skip => true, it’ll bypass it during search record generation.

Examples are in generateSearchRecord where we skip based on bundle/language configuration.

To extend that to individual entities, we should do it on the node form, since it feels like it should be an editorial decision (not administrative).

So add a quant_search_skip value to node entities, which we lookup in generateSearchRecord and inject skip => true so it skips the indexing.

Remaining tasks

  1. Update code
  2. Code review + testing
  3. Commit :)

User interface changes

User sees the option on the node form.

API changes

Data model changes

We need to save the option.

✨ Feature request
Status

Active

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024