0
0
Fork 0

properly initialize index stats object for in memory indexes

This commit is contained in:
Marty Schoch 2016-04-20 11:37:51 -04:00
parent 53f7eb2891
commit 709b418823
1 changed files with 6 additions and 5 deletions

View File

@ -51,13 +51,14 @@ func indexStorePath(path string) string {
func newMemIndex(indexType string, mapping *IndexMapping) (*indexImpl, error) {
rv := indexImpl{
path: "",
name: "mem",
m: mapping,
meta: newIndexMeta(indexType, gtreap.Name, nil),
stats: &IndexStat{},
path: "",
name: "mem",
m: mapping,
meta: newIndexMeta(indexType, gtreap.Name, nil),
}
rv.stats = &IndexStat{i: &rv}
// open the index
indexTypeConstructor := registry.IndexTypeConstructorByName(rv.meta.IndexType)
if indexTypeConstructor == nil {