Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove camel case tokenization from repo indexer #7733

Merged
merged 9 commits into from
Aug 6, 2019
5 changes: 3 additions & 2 deletions modules/indexer/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (

"github.com/blevesearch/bleve"
"github.com/blevesearch/bleve/analysis/analyzer/custom"
"github.com/blevesearch/bleve/analysis/token/camelcase"
// Don't break indexes from previous versions created with camelcase
_ "github.com/blevesearch/bleve/analysis/token/camelcase"
"github.com/blevesearch/bleve/analysis/token/lowercase"
"github.com/blevesearch/bleve/analysis/token/unique"
"github.com/blevesearch/bleve/analysis/tokenizer/unicode"
Expand Down Expand Up @@ -111,7 +112,7 @@ func createRepoIndexer(path string, latestVersion int) error {
"type": custom.Name,
"char_filters": []string{},
"tokenizer": unicode.Name,
"token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name, unique.Name},
"token_filters": []string{unicodeNormalizeName, lowercase.Name, unique.Name},
}); err != nil {
return err
}
Expand Down