Closed Lee182 closed 3 years ago
I'm just looking at the source code for this libary because I'm looking to adapt it for my own project.
I noticed in constructor _fieldsIds is reset, yet in removeAll it is not. Is this intentional or a mini memory bug?
// MiniSearch.ts constructor this._index = new SearchableMap() this._documentCount = 0 this._documentIds = {} this._fieldIds = {} this._fieldLength = {} this._averageFieldLength = {} this._nextId = 0 this._storedFields = {}
// MiniSearch.ts removeAll this._index = new SearchableMap() this._documentCount = 0 this._documentIds = {} this._fieldLength = {} this._averageFieldLength = {} this._storedFields = {} this._nextId = 0
Ah silly me it intention sorry to bother.
No problem @Lee182 , and thanks for taking the time to open an issue, even if it ended up being correct :)
I'm just looking at the source code for this libary because I'm looking to adapt it for my own project.
I noticed in constructor _fieldsIds is reset, yet in removeAll it is not. Is this intentional or a mini memory bug?