Skip to content

Commit e41403b

Browse files
committed
improve code
1 parent a4b8ab7 commit e41403b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ relation to port exhaustion.
228228

229229
## Indexer (`indexer`)
230230

231-
- `ISSUE_INDEXER_TYPE`: **bleve**: Issue indexer type, currently support: bleve, db or elasticsearch, if it's db, below issue indexer item will be invalid.
231+
- `ISSUE_INDEXER_TYPE`: **bleve**: Issue indexer type, currently supported: `bleve`, `db` or `elasticsearch`.
232232
- `ISSUE_INDEXER_CONN_STR`: ****: Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch. i.e. http://elastic:changeme@localhost:9200
233233
- `ISSUE_INDEXER_NAME`: **gitea_issues**: Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch
234-
- `ISSUE_INDEXER_PATH`: **indexers/issues.bleve**: Index file used for issue search.
234+
- `ISSUE_INDEXER_PATH`: **indexers/issues.bleve**: Index file used for issue search; available when ISSUE_INDEXER_TYPE is bleve and elasticsearch.
235235
- The next 4 configuration values are deprecated and should be set in `queue.issue_indexer` however are kept for backwards compatibility:
236236
- `ISSUE_INDEXER_QUEUE_TYPE`: **levelqueue**: Issue indexer queue, currently supports:`channel`, `levelqueue`, `redis`.
237237
- `ISSUE_INDEXER_QUEUE_DIR`: **indexers/issues.queue**: When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this will be the queue will be saved path.

modules/indexer/issues/bleve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func NewBleveIndexer(indexDir string) *BleveIndexer {
170170
}
171171
}
172172

173-
// Init will initial the indexer
173+
// Init will initialize the indexer
174174
func (b *BleveIndexer) Init() (bool, error) {
175175
var err error
176176
b.indexer, err = openIndexer(b.indexDir, issueIndexerLatestVersion)

modules/indexer/issues/elastic_search.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const (
9393
}`
9494
)
9595

96-
// Init will initial the indexer
96+
// Init will initialize the indexer
9797
func (b *ElasticSearchIndexer) Init() (bool, error) {
9898
ctx := context.Background()
9999
exists, err := b.client.IndexExists(b.indexerName).Do(ctx)
@@ -142,7 +142,6 @@ func (b *ElasticSearchIndexer) Index(issues []*IndexerData) error {
142142
reqs = append(reqs,
143143
elastic.NewBulkIndexRequest().
144144
Index(b.indexerName).
145-
//Type(b.typeName).
146145
Id(fmt.Sprintf("%d", issue.ID)).
147146
Doc(map[string]interface{}{
148147
"id": issue.ID,

0 commit comments

Comments
 (0)