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:
// If the index was serialized with: letindex = createIndex({ fields: ['title', 'text'] })
addAll(index, documents)
constjson = JSON.stringify(index) // It can later be deserialized like this: index = loadJSONIndex(json, { fields: ['title', 'text'] })
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: