isLazy
The boolean flag indicating that index is lazy or not. The default value is false.
If the index is lazy, the index will not automatically updated when the documents in the collection are changed except when the documents are deleted or purged.
When using the lazy index mode, the expression set in the config must refer to the values that will be used later for computing vectors for the index instead of vector embeddings or prediction() function that returns vectors.
To update the index:
Use Collection's getIndex(name: String) to get the index.
Call beginUpdate(int limit) on the index object with the max number of vectors to be updated into the index. The function will return an IndexUpdater object.
For each of the
countitems, call a value getter such as getValue(at index: Int) on the IndexUpdater object to get the value for computing the vector. The returned value is based on the expression set to the VectorIndexConfiguration object used when creating the vector index.Call setVector() on the IndexUpdater object to set the computed vector or null to remove the index row.
Call skipVector() on the IndexUpdater object to skip setting the vector. The value will be returned again next time when calling beginUpdate() function on the index object.
Call finish() on the IndexUpdater object to save all the vector set to the IndexUpdater object.