-/* $Id: zrpn.c,v 1.222 2006-07-03 10:43:43 adam Exp $
+/* $Id: zrpn.c,v 1.226 2006-08-14 10:40:15 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
for more details.
You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
#include <stdio.h>
static int log_level_set = 0;
static int log_level_rpn = 0;
-
+#define TERMSET_DISABLE 1
static const char **rpn_char_map_handler(void *vp, const char **from, int len)
{
assert(*info == sizeof(*p->isam_p_buf));
memcpy(p->isam_p_buf + p->isam_p_indx, info+1, sizeof(*p->isam_p_buf));
-#if 1
if (p->termset)
{
const char *db;
resultSetAddTerm(p->zh, p->termset, name[len], db,
index_name, term_tmp);
}
-#endif
(p->isam_p_indx)++;
}
AttrType hits_limit_attr;
int term_ref_id_int;
- attr_init_APT(&hits_limit_attr, zapt, 9);
+ attr_init_APT(&hits_limit_attr, zapt, 11);
*hits_limit_value = attr_find(&hits_limit_attr, NULL);
attr_init_APT(&term_ref_id_attr, zapt, 10);
grep_info->zh = zh;
grep_info->reg_type = reg_type;
grep_info->termset = 0;
-
if (!zapt)
return ZEBRA_OK;
attr_init_APT(&termset, zapt, 8);
attr_find_ex(&termset, NULL, &termset_value_string);
if (termset_value_numeric != -1)
{
+#if TERMSET_DISABLE
+ zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, "termset");
+ return ZEBRA_FAIL;
+#else
char resname[32];
const char *termset_name = 0;
if (termset_value_numeric != -2)
zebra_setError(zh, YAZ_BIB1_ILLEGAL_RESULT_SET_NAME, termset_name);
return ZEBRA_FAIL;
}
+#endif
}
return ZEBRA_OK;
}
/**
\brief Create result set(s) for list of terms
\param zh Zebra Handle
+ \param zapt Attributes Plust Term (RPN leaf)
\param termz term as used in query but converted to UTF-8
\param attributeSet default attribute set
\param stream memory for result
\param xpath_use use attribute for X-Path (-1 for no X-path)
\param num_bases number of databases
\param basenames array of databases
- \param rset_mem memory for result sets
+ \param rset_nmem memory for result sets
\param result_sets output result set for each term in list (output)
- \param number number of output result sets
+ \param num_result_sets number of output result sets
\param kc rset key control to be used for created result sets
*/
static ZEBRA_RES term_list_trunc(ZebraHandle zh,