39 |
#define SortMem 16 * 1024 |
#define SortMem 16 * 1024 |
40 |
#endif |
#endif |
41 |
|
|
42 |
|
#define ATTR_DELIMITER "{{!}}" |
43 |
|
|
44 |
/* prototype */ |
/* prototype */ |
45 |
char *attr2text(ESTDOC *doc, char *attr); |
char *attr2text(ESTDOC *doc, char *attr); |
46 |
|
|
205 |
|
|
206 |
/* minimum valid attribute length is 10: @a STREQ a */ |
/* minimum valid attribute length is 10: @a STREQ a */ |
207 |
if (! PG_ARGISNULL(2) && strlen(attr) >= 10) { |
if (! PG_ARGISNULL(2) && strlen(attr) >= 10) { |
208 |
elog(DEBUG1,"est_cond_add_attr(%s)", attr); |
elog(DEBUG1,"attributes: %s", attr); |
209 |
est_cond_add_attr(cond, attr); |
char *curr_attr; |
210 |
|
curr_attr = strtok(attr, ATTR_DELIMITER); |
211 |
|
while (curr_attr) { |
212 |
|
elog(DEBUG1,"est_cond_add_attr(%s)", curr_attr); |
213 |
|
est_cond_add_attr(cond, curr_attr); |
214 |
|
curr_attr = strtok(NULL, ATTR_DELIMITER); |
215 |
|
} |
216 |
} |
} |
217 |
|
|
218 |
/* set the search phrase to the search condition object */ |
/* set the search phrase to the search condition object */ |
221 |
est_cond_set_order(cond, order); |
est_cond_set_order(cond, order); |
222 |
} |
} |
223 |
|
|
224 |
|
if (limit) { |
225 |
|
elog(DEBUG1,"est_cond_set_max(%d)", limit + offset); |
226 |
|
est_cond_set_max(cond, limit + offset); |
227 |
|
} |
228 |
|
|
229 |
/* get the result of search */ |
/* get the result of search */ |
230 |
est_result = est_db_search(db, cond, &resnum, NULL); |
est_result = est_db_search(db, cond, &resnum, NULL); |
231 |
|
|