Description

The RTI_BITMAP_INDEX_SEARCH function searches a bitmap index to return the set of keys whose values which match the search criteria.

Syntax

RTI_BITMAP_INDEX_SEARCH( tableName, columnName, searchType, searchVals)

Parameters

tableNameInName of the table to search. Required.
columnNaneInName of the index column. Required.
searchTypeIn

Type of search to perform.

 This can be one of the following values:

“AND”

 "OR"

searchValsIn@vm delimited list of terms to search for.

Returns

@vm delimited list of keys that match the search query.  Errors are returned via Set_Status

Example

Function test_rti_bitmap_search(void)
/*
** Example of using RTI_BITMAP_SEARCH
*/
Declare Function RTI_BITMAP_INDEX_SEARCH
* filename is Name of the indexed table
filename   = "UTF8_WORDS"  
    
* fieldname is Name of the indexed column
fieldname  = "NON_ASCII_LEN"
* searchtype can one of  "OR", "AND", defaults to "OR"
searchType = "OR"
* Searchvals is VM delimited list
* Exact match only. Qualifiers such starting with, contains, from...to are not supported.
item1 = "96"
item2 = "71"
searchVals = item1:@vm:item2
* returns vm delimited list of keys
hits = RTI_BITMAP_INDEX_SEARCH(filename, fieldname, searchType, searchVals)
this_cnt = dcount(hits, @vm)
Return hits
  • No labels