Secondary indexes
The data type provides simplest secondary index you can create with immudb. That’s a data structure that represents a set of elements ordered by the score of each element, which is a floating point number. The score type is a float64 to accommodate the maximum number of uses cases. 64-bit floating point gives a lot of flexibility and dynamic range, at the expense of having only 53-bits of integer.
When an integer64 is cast to a float there could be a loss of precision, but the insertion order is guaranteed by the internal database index that is appended to the internal index key.
ZScan
accepts following arguments:
Set
: the name of the collectionSeekKey
: initial key for the first entry in the iteration. OptionalSeekAtTx
: the tx id for the first entry in the iteration. OptionalInclusiveSeek
: the element resulting from the combination of theSeekKey
SeekScore
andSeekAtTx
is returned with the result. OptionalDesc
: DESC or ASC sorting order. OptionalNoWait
: when true scan doesn’t wait that txSinceTx is processed. OptionalMinScore
: minimum score filter. OptionalMaxScore
: maximum score filter. Optional
This feature is not yet supported or not documented. Do you want to make a feature request or help out? Open an issue on .Net sdk github project (opens new window)
If you’re using another development language, please read up on our option.