search_index isn't an option for content preview

Created on 29 January 2025, 23 days ago

Problem/Motivation

#1510544: Allow to preview content in an actual live environment β†’ added the the ability to preview content which is an invaluable tool to both site developers and content creators. In the context of that discussion search_index was concluded to not be part of a "actual live environment" so where excluded from previews. While accurate in the original requirements, not being able to quickly review what content will be indexed makes search development more difficult for developers and excludes a tool that could help content editors be confident the correct content is being indexed.

Steps to reproduce

Preview content with a search_index display mode. Search index is not an available display mode.

Proposed resolution

Allow search index to be select-able as a preview display mode.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.1 πŸ”₯

Component

node system

Created by

πŸ‡ΊπŸ‡ΈUnited States neclimdul Houston, TX

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

Merge Requests

Comments & Activities

  • Issue created by @neclimdul
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • πŸ‡ΊπŸ‡ΈUnited States neclimdul Houston, TX

    Should be a simple fix in the merge request

  • Pipeline finished with Success
    23 days ago
    Total: 2111s
    #410438
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Here are some tickets where this appears to have been tweaked/altered

    #2322503: getDisplayModeOptions() returns only full or teaser regardless of the status of the entity display β†’
    Added in #1510544: Allow to preview content in an actual live environment β†’

    From what I can tell search_index was mentioned twice but not really discussed. Personally don't see a reason not, it's 100% front-end view.
    Change also seems small enough that probably doesn't warrant test coverage. Also we never hid search_result so not sure why to hide this one.

    I applied the MR and confirmed search_index now appears.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Search index isn't a front end view, it's what the search module sees when it indexes content. You could have a 'search result' view mode for use with search_api module or similar but that wouldn't be the same as the one for indexing.

    I don't have a strong opinion on showing it or not, but I think we could use a product or UX review here given that was the original reason for hiding it.

  • πŸ‡§πŸ‡ͺBelgium borisson_ Mechelen, πŸ‡§πŸ‡ͺ

    I agree with catch, this is not simply for frontend usage. However it might be useful to help figure out why some entity is not indexed into search api correctly.
    It doesn't look like there's an easy way for search api to reenable this for those purposes?

  • πŸ‡ΊπŸ‡ΈUnited States neclimdul Houston, TX

    Yeah I don't disagree with classifying search_index as not strictly a frontend view.

    I think what I was trying to convey in the summary was that while Drupal we called the preview interface "Preview in live environment" in the original issue, but that is in no way conveyed to the site user. To a developer and content editor its just "Preview" so seeing how something will be pushed into a search index can provide a lot of valuable information.

    So limiting the interface to strictly frontend displays doesn't always meet user expectations. At least it didn't meet mine.

Production build 0.71.5 2024