Insert to the index a record whose key is value and record ID is rid. Return OK if no errors. Otherwise, return the error code.