loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix file name could not be searched if the file was not a text file when using the Bleve indexer (#33959)

Close #33828

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit b956cee06f462c4f34a7911351b7c878ce890725)

authored by

charles
wxiaoguang
and committed by
Gusted
9d8624f3 839739fb

+2 -1
+2 -1
modules/indexer/code/bleve/bleve.go
··· 179 179 return err 180 180 } else if !typesniffer.DetectContentType(fileContents).IsText() { 181 181 // FIXME: UTF-16 files will probably fail here 182 - return nil 182 + // Even if the file is not recognized as a "text file", we could still put its name into the indexers to make the filename become searchable, while leave the content to empty. 183 + fileContents = nil 183 184 } 184 185 185 186 if _, err = batchReader.Discard(1); err != nil {