IndexUpdater
public class IndexUpdater : ArrayProtocol, SequenceENTERPRISE EDITION ONLY
IndexUpdater is used for updating the index in lazy mode. Currently, the vector index is the only index type that can be updated lazily.
- 
                  
                  The total number of vectors to compute and set for updating the index. DeclarationSwift public var count: Int { get }
- 
                  
                  Get the value at the given index for computing the vector. The value types are Blob, ArrayObject, DictionaryObject, Number, String, or NSNull based on the underlying data type. Returns nil if the value doesn’t exist, or its value is not a string. DeclarationSwift public func value(at index: Int) -> Any?
- 
                  
                  Get the value as string at the given index for computing the vector. Returns nil if the value doesn’t exist, or its value is not a string DeclarationSwift public func string(at index: Int) -> String?
- 
                  
                  Gets the value at the given index as an Int for computing the vector. Floating point values will be rounded. The value trueis returned as 1,falseas 0. Returns 0 if the value doesn’t exist or does not have a numeric value.DeclarationSwift public func int(at index: Int) -> Int
- 
                  
                  Gets the value at the given index as an Int64 for computing the vector. Floating point values will be rounded. The value trueis returned as 1,falseas 0. Returns 0 if the value doesn’t exist or does not have a numeric value.DeclarationSwift public func int64(at index: Int) -> Int64
- 
                  
                  Gets the value at the given index as a Float for computing the vector. Integers will be converted to float. The value trueis returned as 1.0,falseas 0.0. / Returns 0.0 if the value doesn’t exist or does not have a numeric value.DeclarationSwift public func float(at index: Int) -> Float
- 
                  
                  Gets the value at the given index as a Double for computing the vector. Integers will be converted to double. The value trueis returned as 1.0,falseas 0.0. Returns 0.0 if the property doesn’t exist or does not have a numeric value.DeclarationSwift public func double(at index: Int) -> Double
- 
                  
                  Gets the value at the given index as an NSNumber for computing the vector. Returns nil if the value doesn’t exist, or its value is not a numeric value. DeclarationSwift public func number(at index: Int) -> NSNumber?
- 
                  
                  Gets the value at the given index as a Bool for computing the vector. Returns true if the value exists, and is either trueor a nonzero number.DeclarationSwift public func boolean(at index: Int) -> Bool
- 
                  
                  Gets the value at the given index as a Blob for computing the vector. Returns nil if the value doesn’t exist, or its value is not a blob. DeclarationSwift public func blob(at index: Int) -> Blob?
- 
                  
                  Gets the value at the given index as a Date for computing the vector. JSON does not directly support dates, so the actual property value must be a string, which is then parsed according to the ISO-8601 date format (the default used in JSON.) Returns nil if the value doesn’t exist, is not a string, or is not parseable as a date. DeclarationSwift public func date(at index: Int) -> Date?
- 
                  
                  Gets the value at the given index as an ArrayObject for computing the vector. Returns nil if the value doesn’t exists, or its value is not an array. DeclarationSwift public func array(at index: Int) -> ArrayObject?
- 
                  
                  Gets the value at the given index as a DictionaryObject for computing the vector. Returns nil if the value doesn’t exists, or its value is not a dictionary. DeclarationSwift public func dictionary(at index: Int) -> DictionaryObject?
- 
                  
                  Gets content of the current object as an Array. The value types of the values contained in the returned Array object are Array, Blob, Dictionary, Number types, NSNull, and String. DeclarationSwift public func toArray() -> Array<Any>
- 
                  
                  Return all values as JSON String DeclarationSwift public func toJSON() -> String
- 
                  
                  Subscript access to a Fragment object by index DeclarationSwift public subscript(index: Int) -> Fragment { get }
- 
                  
                  Gets an iterator over values. DeclarationSwift public func makeIterator() -> AnyIterator<Any?>Return ValueThe value iterator. 
- 
                  
                  Sets the vector for the value corresponding to the index. Setting nil value means that there is no vector for the value, and any existing vector will be removed when the finish() is called. DeclarationSwift public func setVector(_ value: Array<Float>?, at index: Int) throwsParametersvalueArray of float numbers. indexThe index. 
- 
                  
                  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(limit:) is later called for updating the index. DeclarationSwift public func skipVector(at index: Int)ParametersindexThe index. 
- 
                  
                  Updates the index with the computed vectors and removes any index rows for which nil vector was given. If there are any indexes that do not have their vector value set or are skipped, a unsupported error will be thrown. Note Before calling the finish() function, the set vectors are kept in the memory.DeclarationSwift public func finish() throws
 IndexUpdater Class Reference
        IndexUpdater Class Reference