Search misses OCR terms when indexed and query casing differ
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
- Ingest an image or document whose OCR text contains
RAGFlow documents. - Search for
RAGFlow. - Search for
documentsas 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.
Source: infiniflow/ragflow