#20304·ragflow

Search misses OCR terms when indexed and query casing differ

Author: jay77721Created Sep 28, 2026Updated Sep 28, 2026
Labels🐞 bug

Description

End-to-end validation found that OCR text is indexed with its original capitalization, while search query normalization lowercases terms. For example, an indexed OCR token RAGFlow is not found when searching for RAGFlow, because the query becomes ragflow. Lowercase OCR terms such as documents are searchable.

The OCR text is present in the indexed chunk. This appears to be a case-normalization mismatch between indexed tokens and the Elasticsearch query path.

Steps to reproduce

  1. Ingest an image or document whose OCR text contains RAGFlow documents.
  2. Search for RAGFlow.
  3. Search for documents as a comparison.

Expected behavior

Search should find the document regardless of capitalization in the indexed text and the search query.

Actual behavior

The search for RAGFlow returns no result, while the lowercase term documents returns the document.

Validation context

Observed while validating PR #20166 through ParserComponent, GeneralChunker, Tokenizer, and a temporary Elasticsearch index. The mismatch appears to involve the existing Go tokenization/indexing and Elasticsearch query normalization path; it is not an OCR recognition failure.