Deserializes a JSON index (serialized with JSON.stringify(index)) and instantiates a SearchIndex instance. It should be given the same options originally used when serializing the index.
JSON.stringify(index)
// If the index was serialized with:let index = createIndex({ fields: ['title', 'text'] })addAll(index, documents)const json = JSON.stringify(index)// It can later be deserialized like this:index = loadJSONIndex(json, { fields: ['title', 'text'] }) Copy
// If the index was serialized with:let index = createIndex({ fields: ['title', 'text'] })addAll(index, documents)const json = JSON.stringify(index)// It can later be deserialized like this:index = loadJSONIndex(json, { fields: ['title', 'text'] })
JSON-serialized index
configuration options, same as the constructor
An instance of SearchIndex deserialized from the given JSON.
Generated using TypeDoc
Deserializes a JSON index (serialized with
JSON.stringify(index)
) and instantiates a SearchIndex instance. It should be given the same options originally used when serializing the index.Usage: