10 |
* NOTES: |
* NOTES: |
11 |
* - clear structures with memset to support hash indexes (who whould like |
* - clear structures with memset to support hash indexes (who whould like |
12 |
* to create hash index on table returned from function?) |
* to create hash index on table returned from function?) |
13 |
|
* - number of returned rows is set by PostgreSQL evaluator, see: |
14 |
|
* http://archives.postgresql.org/pgsql-hackers/2005-02/msg00546.php |
15 |
* |
* |
16 |
* Based on: |
* Based on: |
17 |
* - C example from PostgreSQL documentation (BSD licence) |
* - C example from PostgreSQL documentation (BSD licence) |
81 |
|
|
82 |
if ( SwishError( swish_handle ) ) error_or_abort( swish_handle ); |
if ( SwishError( swish_handle ) ) error_or_abort( swish_handle ); |
83 |
/* set ranking scheme. default is 0 */ |
/* set ranking scheme. default is 0 */ |
84 |
SwishRankScheme( swish_handle, 1 ); |
SwishRankScheme( swish_handle, 0 ); |
85 |
|
|
86 |
/* Check for errors after every call */ |
/* Check for errors after every call */ |
87 |
if ( SwishError( swish_handle ) ) |
if ( SwishError( swish_handle ) ) |
89 |
|
|
90 |
elog(INFO, "pgswish: SwishQuery(%s)", query); |
elog(INFO, "pgswish: SwishQuery(%s)", query); |
91 |
/* Here's a short-cut to searching that creates a search object and searches at the same time */ |
/* Here's a short-cut to searching that creates a search object and searches at the same time */ |
|
elog(INFO,"## FIXME: SwishQuery kills back-end?"); |
|
92 |
results = SwishQuery( swish_handle, query); |
results = SwishQuery( swish_handle, query); |
|
elog(INFO,"## FIXME: no..."); |
|
93 |
if ( SwishError( swish_handle ) ) error_or_abort( swish_handle ); |
if ( SwishError( swish_handle ) ) error_or_abort( swish_handle ); |
94 |
|
|
95 |
/* total number of tuples to be returned */ |
/* total number of tuples to be returned */ |