bugfixes more search results and dump restore options

This commit is contained in:
ston1th 2016-11-17 21:21:16 +01:00
commit 3cd460318a
124 changed files with 3915 additions and 9579 deletions

View file

@ -15,13 +15,12 @@ import (
"log"
"time"
"github.com/blevesearch/bleve/analysis/datetime_parsers/datetime_optional"
"github.com/blevesearch/bleve/index"
"github.com/blevesearch/bleve/index/store/boltdb"
"github.com/blevesearch/bleve/index/store/gtreap"
"github.com/blevesearch/bleve/index/upside_down"
"github.com/blevesearch/bleve/registry"
"github.com/blevesearch/bleve/search/highlight/highlighters/html"
_ "github.com/blevesearch/bleve/index/firestorm"
)
var bleveExpVar = expvar.NewMap("bleve")
@ -30,7 +29,9 @@ type configuration struct {
Cache *registry.Cache
DefaultHighlighter string
DefaultKVStore string
DefaultMemKVStore string
DefaultIndexType string
QueryDateTimeParser string
SlowSearchLogThreshold time.Duration
analysisQueue *index.AnalysisQueue
}
@ -59,15 +60,23 @@ func init() {
Config.DefaultHighlighter = html.Name
// default kv store
Config.DefaultKVStore = boltdb.Name
Config.DefaultKVStore = ""
// default mem only kv store
Config.DefaultMemKVStore = gtreap.Name
// default index
Config.DefaultIndexType = upside_down.Name
// default query date time parser
Config.QueryDateTimeParser = datetime_optional.Name
bootDuration := time.Since(bootStart)
bleveExpVar.Add("bootDuration", int64(bootDuration))
indexStats = NewIndexStats()
bleveExpVar.Set("indexes", indexStats)
initDisk()
}
var logger = log.New(ioutil.Discard, "bleve", log.LstdFlags)