Show / Hide Table of Contents

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
IArray.Count
IArray.GetArray(Int32)
IArray.GetBlob(Int32)
IArray.GetBoolean(Int32)
IArray.GetDate(Int32)
IArray.GetDictionary(Int32)
IArray.GetDouble(Int32)
IArray.GetFloat(Int32)
IArray.GetInt(Int32)
IArray.GetLong(Int32)
IArray.GetString(Int32)
IArray.GetValue(Int32)
IArray.ToList()
IArrayFragment.Item[Int32]
System.Collections.Generic.IEnumerable<System.Object>.GetEnumerator()
System.IDisposable.Dispose()
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 Source

Finish()

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX