8000 bug(parser): HTMLParser ignores flatten_media_to_text configuration · Issue #22007 · infiniflow/ragflow · GitHub
[go: up one dir, main page]

Skip to content

bug(parser): HTMLParser ignores flatten_media_to_text configuration #22007

Open

Description

@ccclucky

Description

The ingestion pipeline templates and defaultSetups() define flatten_media_to_text: false, allowing users to flatten structured table and image elements into plain text items.

While PDFParser, MarkdownParser, and DOCXParser support flatten_media_to_text, HTMLParser (internal/parser/parser/html_parser.go) currently drops flatten_media_to_text in ConfigureFromSetup. As a result, HTML documents always emit doc_type_kwd: "table" with structured TableData and doc_type_kwd: "image", ignoring the flattening setting.

Expected Behavior

When flatten_media_to_text is enabled:

  • Structured table items should render their HTML content into item["text"], delete item["table"], and set item["doc_type_kwd"] = "text".
  • Image items should have item["doc_type_kwd"] rewritten to "text".

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0