
|
Click on an icon to see it's
properties
|
TrbSearch
rbSearch1
This Rubicon component interprets a search string, reads the indexes of the words
being searched from the Words link, applies the search logic to the indexes, and returns a
list of matching records. For proximity searches, it may have to read some records
from the Text link. |
| | |
| |
| |
Text
Link
rbTextTableLink1
Rubicon component used to read selected fields from records in the Text table |
Words
Link
rbWordsTableLink1
Rubicon component used to access the Words table |
TrbMatchMaker
rbMatchMaker1
Optional Rubicon component used to create a dataset of matching records |
| | |
| |
| |
Database
Engine
Borland Database Engine via TTable
(Rubicon supports TQuery's and several other database engines) |
| | |
| |
| |
Text
Table
TextTable
The table that has been indexed with TrbMake |
Words
Table
WordsTable
Table that contains the words and indexes created by TrbMake |
Match
DataSet
MatchTable
Dataset created by TrbMatchMaker. May be an in-memory table such as a
TClientDataSet.
|
Other Components
Coding
procedure TForm1.Button1Click(Sender: TObject);
begin
with rbSearch1 do
begin
SearchFor := Edit1.Text;
Execute;
Label1.Caption := Format('%d matches (%1.3f sec)',
[MatchCount,SearchTime/1000]);
if MatchCount > 0 then
rbMatchMaker1.Execute
end
end;
In most cases a search can be performed by simply setting the
TrbSearch SearchFor property and calling the Execute method. This example also
displays the number of hits or matches and the elapsed time of the search.
The easiest way to display the matching records is to
create a match dataset with TrbMatchMaker, and the fastest way to to this is with an
in-memory dataset like a TClientDataSet. However, creating a dataset always involves
some overhead, so the most efficient approach is to use the TrbSearch FindFirst and
FindNext methods to build a list of matching records (e.g. build an HTML page).
See Also
|