Interface IIndexUpdater
An interface used for updating the index in lazy mode.
Currently, vector index is the only index type that
can be updated lazily.
Warning
Any collections retrieved from this interface via GetValue(Int32)
or any of the overrides will be invalidated once this object is disposed and any
attempt to use them will result in an System.ObjectDisposedException
Inherited Members
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public interface IIndexUpdater : IArray, IArrayFragment, IEnumerable<object>, IEnumerable, IDisposable
Remarks
Note
This is an enterprise edition feature
Methods
| Improve this Doc View SourceFinish()
Updates the index with the computed vectors and removes
any index rows for which null vector was given.
Important
Before calling this function, the set vectors are kept in the memory.
Warning
This function also disposes this object upon completion
Declaration
void Finish()
Remarks
Note
This is an enterprise edition feature
Exceptions
Type | Condition |
---|---|
CouchbaseLiteException | Thrown if there are outstanding indexes in the updater that have neither been set nor skipped. |
System.ObjectDisposedException | Thrown if the object has already been disposed |
SetVector(Int32, IEnumerable<Single>)
Sets the vector for the value corresponding to the index.
Setting null
value means that there is no vector for the value,
and any existing vector will be removed when Finish() is
called.
Declaration
void SetVector(int index, IEnumerable<float> vector)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index at which to set the calculated vector |
System.Collections.Generic.IEnumerable<System.Single> | vector | The vector value to set |
Remarks
Note
This is an enterprise edition feature
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | Thrown if the object has already been disposed |
SkipVector(Int32)
Skip setting the vector for the value corresponding to the index. The vector will be required to compute and set again for the value when the QueryIndex's BeginUpdate(UInt64) is later called for updating the index.
Declaration
void SkipVector(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to skip setting the vector at |
Remarks
Note
This is an enterprise edition feature
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | Thrown if the object has already been disposed |