summaryrefslogtreecommitdiffstats
path: root/modules/indexer/issues/indexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indexer/issues/indexer.go')
-rw-r--r--modules/indexer/issues/indexer.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go
index 41af5c36b6..c5d6d05a60 100644
--- a/modules/indexer/issues/indexer.go
+++ b/modules/indexer/issues/indexer.go
@@ -33,7 +33,8 @@ type Match struct {
// SearchResult represents search results
type SearchResult struct {
- Hits []Match
+ Total int64
+ Hits []Match
}
// Indexer defines an inteface to indexer issues contents
@@ -54,6 +55,7 @@ var (
// all issue index done.
func InitIssueIndexer(syncReindex bool) error {
var populate bool
+ var dummyQueue bool
switch setting.Indexer.IssueType {
case "bleve":
issueIndexer = NewBleveIndexer(setting.Indexer.IssuePath)
@@ -62,10 +64,17 @@ func InitIssueIndexer(syncReindex bool) error {
return err
}
populate = !exist
+ case "db":
+ issueIndexer = &DBIndexer{}
+ dummyQueue = true
default:
return fmt.Errorf("unknow issue indexer type: %s", setting.Indexer.IssueType)
}
+ if dummyQueue {
+ return nil
+ }
+
var err error
switch setting.Indexer.IssueIndexerQueueType {
case setting.LevelQueueType: