matches all records in a database.
+Implemented bug #588: allrecords search. Using @attr 1=allrecords ""
+matches all records in a database.
+
Zebra reads (non-standard) attribute 10 for RPN queries. The value, when
specified, is returned as subqueryId in SearchResult-1. It un-specified
no subqueryId is part of SearchResult-1.
-/* $Id: extract.c,v 1.212 2006-05-10 14:13:45 adam Exp $
+/* $Id: extract.c,v 1.213 2006-05-17 17:46:45 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
}
}
+static void extract_add_index_string (RecWord *p, const char *str, int length);
+
static void extract_set_store_data_prepare(struct recExtractCtrl *p);
static void extract_init (struct recExtractCtrl *p, RecWord *w)
ctrl->flagShowRecords = !zh->m_flag_rw;
}
+static void all_matches_add(struct recExtractCtrl *ctrl)
+{
+ RecWord word;
+ extract_init(ctrl, &word);
+ word.index_name = "allrecords";
+ word.index_type = 'w';
+ word.seqno = 1;
+ extract_add_index_string (&word, "", 0);
+}
+
static ZEBRA_RES file_extract_record(ZebraHandle zh,
SYSNO *sysno, const char *fname,
int deleteFlag,
}
return ZEBRA_FAIL;
}
+ all_matches_add(&extractCtrl);
if (extractCtrl.match_criteria[0])
- matchStr = extractCtrl.match_criteria;
+ matchStr = extractCtrl.match_criteria;
}
/* if matchStr is set now - we assume it's printable .
return ZEBRA_FAIL;
}
+ all_matches_add(&extractCtrl);
+
if (extractCtrl.match_criteria[0])
match_criteria = extractCtrl.match_criteria;
}
}
-void extract_add_index_string (RecWord *p, const char *str, int length)
+void extract_add_index_string(RecWord *p, const char *str, int length)
{
struct it_key key;
-/* $Id: kinput.c,v 1.74 2006-05-10 08:13:22 adam Exp $
+/* $Id: kinput.c,v 1.75 2006-05-17 17:46:45 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
if ((dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
int mode;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
while (heap_cread_item2(hci, &dst, &mode))
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
#if 0
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
if (!(dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
-/* $Id: zrpn.c,v 1.212 2006-05-10 08:13:23 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: zrpn.c,v 1.213 2006-05-17 17:46:45 adam Exp $
+ Copyright (C) 1995-2006
Index Data ApS
This file is part of the Zebra server.
break;
case 3:
case 102:
+ case 103:
case -1:
+ if (!**term_sub)
+ return 1;
yaz_log(log_level_rpn, "Relation =");
if (!term_100(zh->reg->zebra_maps, reg_type, term_sub,
term_component, space_split, term_dst))
struct grep_info grep_info;
const char *termp = termz;
int alloc_sets = 0;
+ int empty_term = *termz ? 0 : 1;
+ empty_term = 0;
*num_result_sets = 0;
*term_dst = 0;
if (grep_info_prepare(zh, zapt, &grep_info, reg_type) == ZEBRA_FAIL)
if ((*result_sets)[*num_result_sets] == 0)
break;
(*num_result_sets)++;
+
+ if (empty_term)
+ break;
+ if (!*termp)
+ break;
}
grep_info_delete(&grep_info);
return ZEBRA_OK;
num_bases, basenames, rset_nmem,
rset, kc);
}
+ else if (!strcmp(search_type, "always"))
+ {
+ *termz = '\0';
+ res = rpn_search_APT_phrase(zh, zapt, termz, attributeSet, stream,
+ reg_id, complete_flag, rank_type,
+ xpath_use,
+ num_bases, basenames, rset_nmem,
+ rset, kc);
+ }
else
{
zebra_setError(zh, YAZ_BIB1_UNSUPP_STRUCTURE_ATTRIBUTE, 0);
-/* $Id: zebramap.c,v 1.47 2006-05-10 08:13:46 adam Exp $
+/* $Id: zebramap.c,v 1.48 2006-05-17 17:46:45 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
if (relation_value == 103)
{
*search_type = "always";
+ *reg_id = 'w';
return 0;
}
if (*complete_flag)