aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2025-03-25 01:02:05 +0800
committerGitHub <noreply@github.com>2025-03-24 10:02:05 -0700
commitf994f3cac6cda36b2be009c3ad64a39cd3933fe8 (patch)
tree14936c52375e2e51c5bfe57ec5a6e148b210bf59
parentf514b2651e8bb44696f7857dd265837cb985f797 (diff)
downloadgitea-f994f3cac6cda36b2be009c3ad64a39cd3933fe8.tar.gz
gitea-f994f3cac6cda36b2be009c3ad64a39cd3933fe8.zip
Fix incorrect code search indexer options (#33992) (#33999)
Backport #33992 by @wxiaoguang Fix #33798 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r--modules/indexer/code/bleve/bleve.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/indexer/code/bleve/bleve.go b/modules/indexer/code/bleve/bleve.go
index 981fe75c3d..395c7a0d31 100644
--- a/modules/indexer/code/bleve/bleve.go
+++ b/modules/indexer/code/bleve/bleve.go
@@ -28,7 +28,6 @@ import (
"github.com/blevesearch/bleve/v2"
analyzer_custom "github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
analyzer_keyword "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword"
- "github.com/blevesearch/bleve/v2/analysis/token/camelcase"
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
"github.com/blevesearch/bleve/v2/analysis/tokenizer/letter"
@@ -70,7 +69,7 @@ const (
filenameIndexerAnalyzer = "filenameIndexerAnalyzer"
filenameIndexerTokenizer = "filenameIndexerTokenizer"
repoIndexerDocType = "repoIndexerDocType"
- repoIndexerLatestVersion = 8
+ repoIndexerLatestVersion = 9
)
// generateBleveIndexMapping generates a bleve index mapping for the repo indexer
@@ -107,7 +106,7 @@ func generateBleveIndexMapping() (mapping.IndexMapping, error) {
"type": analyzer_custom.Name,
"char_filters": []string{},
"tokenizer": letter.Name,
- "token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name},
+ "token_filters": []string{unicodeNormalizeName, lowercase.Name},
}); err != nil {
return nil, err
}