Skip to content

hotfix: allow saving long summaries and descriptions on prod - #283

Merged
saqibmanan merged 1 commit into
mainfrom
hotfix/save-long-summary
Nov 5, 2026
Merged

saqibmanan merged 1 commit into
mainfrom
hotfix/save-long-summary

Conversation

@anantjain341

Copy link
Copy Markdown
Contributor

Fixes #266 on production.

Use cases and collaboratives with a long summary (and items with a long
description) cannot be saved on prod: the save returns an error. The search
index refuses text over about 32,000 bytes, and saving a published item writes
it to search.

This is only that fix from dev (#278, #281), nothing else from dev.

Changes

  • Long text fields (summary, description, bio) lose the raw sub-field in all
    search documents.
  • Migration 0054_rebuild_long_text_search_indexes: drops and recreates any live
    index that still has such a sub-field; the deploy then refills it. Elasticsearch
    only, no database change. Errors are logged and never fail the migration.

After deploy

  • Search results are empty for a minute or two while the rebuilt indexes refill.
  • No API or response changes.

Before the next dev to main release, main must be merged back into dev with a
merge migration (follow-up PR into dev), so there is a single migration leaf.

Use case and collaborative summaries can be up to 200,000 characters, but
their search mapping kept a keyword-analyzed raw copy that turns the whole
value into one token, and Elasticsearch rejects tokens over 32,766 bytes.
Saving a published item with a long summary returned an error.

Removes those raw sub-fields from the long text fields of all search
documents (same change as #278 and #281 on dev) and adds migration 0054,
which drops and recreates any live index still carrying one; the deploy
then refills it.

Fixes #266
@saqibmanan
saqibmanan merged commit cbdc87c into main Nov 5, 2026
20 of 26 checks passed
@saqibmanan

Copy link
Copy Markdown
Contributor

@anantjain341 this is live on prod now (cbdc87c, deploy finalized). Follow-up from the PR description: dev already has 0054–0059, so main's 0054_rebuild_long_text_search_indexes needs main merged back into dev with a merge migration before the next dev→main release, so there's one migration leaf.

@anantjain341

Copy link
Copy Markdown
Contributor Author

@saqibmanan Thanks. The back-merge with the merge migration is up as #286. It needs to go into dev before #279 or any other dev to main release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Elastic search is not able to index large chunk of text in usecase summary.

2 participants