KI_WS_READ

Look up a row via a word search index

Synopsis:
CALL KI_WS_READ extract_handle, index_handle, SYM(words$), SYM(rowbuf$) TO status, [rowsout]
'ki_ws_read( extract_handle, index_handle, SYM(words$), SYM(rowbuf$), [rowsout] )
ArgumentEnumerationPurpose
extract_handleHandle of the extract file
index_handleHandle of the WS index file
SYM(words$)
SYM(rowbuf$)
statusKDB_ERROR_ENUMReturn status
rowsoutRows read
>KI_WS_READ

KI_WS_READ

This looks up a word search index for the words in the string words$. To be considered for the result set a row must contain indexed columns that include all of the valid words in this string. The words are parsed out of the string using the rules specified when the WS index was built.

The results are returned in the rowbuf$ string and a count of the number of rows that match will be returned in rowsout. Each result is 29 bytes consisting of a 25 byte key field and a 4 byte rowid field. The actual key value is left justified and space padded. Similarly if the rowid size in KI_WS_CREATE was 3 then it will be left justified and space padded. It is recommented that you use a vector array with 29 byte elements. If the receiver is not big enough to hold all the results then they will be silently truncated to what will fit.

This call is not supported for KDB7 tables or any SQL database tables.

History
Introduced in KCML 5.02
See Also:
KI_CLOSE, KI_COPY_TABLE, KI_CREATE, KI_CREATE_TMP, KI_DELETE_ROWS, KI_GET_SERIAL, KI_GROW, KI_INFO, KI_INITIALISE, KI_LOCK_ALL, KI_LOCK_OWNER, KI_MOVE_ROWS, KI_MOVE_TABLE, KI_OPEN, KI_READ, KI_READ_HOLD, KI_READ_HOLD_NEXT, KI_READ_HOLD_PTR, KI_READ_NEXT, KI_READ_PTR, KI_READ_RAW, KI_REBUILD, KI_REWRITE, KI_SET_EXTENT, KI_SET_ROWS, KI_SET_SERIAL, KI_SET_WLOCK_COUNT, KI_SIZE_FILE, KI_START, KI_START_BEG, KI_UNLOCK, KI_UNLOCK_FILE, KI_VERIFY, KI_WMODE_BITMAP, KI_WRITE, KI_WRITE_PTR, KI_WRITE_RAW, KI_WS_ADD_INDEX, KI_WS_CREATE, KI_WS_DELETE, KI_WS_END, KI_WS_NOISE_INFO, KI_WS_OPEN, KI_WS_READ_NEXT, KI_WS_REWRITE, KI_WS_START, KI_WS_WRITE
KCML database status codes