Instantiates a SearchIndex instance from a JS Object. It should be given the same options originally used when serializing the index.
// If the index was serialized with:let index = createIndex({ fields: ['title', 'text'] })addAll(index, documents)const json = index.toJSON()// It can later be loaded like this:index = loadJSON(json, { fields: ['title', 'text'] }) Copy
// If the index was serialized with:let index = createIndex({ fields: ['title', 'text'] })addAll(index, documents)const json = index.toJSON()// It can later be loaded like this:index = loadJSON(json, { fields: ['title', 'text'] })
The id type of the documents being indexed.
The type of the documents being indexed.
index object
configuration options, same as the constructor
An instance of SearchIndex deserialized from the given JS object.
Instantiates a SearchIndex instance from a JS Object. It should be given the same options originally used when serializing the index.
Usage: