properly initialize index stats object for in memory indexes
This commit is contained in:
parent
53f7eb2891
commit
709b418823
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue