+Fixed bug #1142: Non-indexed but listed attributes issues diagnostic.
+
Fixed bug #1132: Missing value-of data in DOM filter.
Fixed bug #1049: zebra.cfg lines with leading space are ignored.
<chapter id="querymodel">
- <!-- $Id: querymodel.xml,v 1.32 2007-05-24 13:44:09 adam Exp $ -->
+ <!-- $Id: querymodel.xml,v 1.33 2007-05-25 12:17:11 adam Exp $ -->
<title>Query Model</title>
<section id="querymodel-overview">
<entry><literal>bib-1</literal></entry>
<entry>Standard &acro.pqf; query language attribute set which defines the
semantics of &acro.z3950; searching. In addition, all of the
- non-use attributes (types 2-12) define the hard-wired
+ non-use attributes (types 2-14) define the hard-wired
&zebra; internal query
processing.</entry>
<entry>default</entry>
<entry>search</entry>
<entry>2.0.8</entry>
</row>
- </tbody>
<row>
<entry>Maximum number of truncated terms (truncmax)</entry>
<entry>13</entry>
<entry>search</entry>
<entry>2.0.10</entry>
</row>
+ <row>
+ <entry>
+ Specifies whether un-indexed fields should be ignored.
+ A zero value (default) throws a diagnostic when an un-indexed
+ field is specified. A non-zero value makes it return 0 hits.
+ </entry>
+ <entry>14</entry>
+ <entry>search</entry>
+ <entry>2.0.16</entry>
+ </row>
+ </tbody>
</tgroup>
</table>
<row>
<entry>numeric (@attr 4=109)</entry>
<entry>ignored</entry>
- <entry>Numeric ('u')</entry>
+ <entry>Numeric ('n')</entry>
<entry>Special index for digital numbers</entry>
</row>
<row>
-/* $Id: attribute.c,v 1.31 2007-05-08 12:50:04 adam Exp $
+/* $Id: attribute.c,v 1.32 2007-05-25 12:17:11 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
}
if (r == -1)
{
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value);
+ zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value);
return ZEBRA_FAIL;
}
}
index_type, use_string);
if (*ord == -1)
{
- if (use_value < 0)
- zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_string);
- else
- zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value);
- return ZEBRA_FAIL;
+ /* attribute 14=1 does not issue a diagnostic even
+ 1) the attribute is numeric but listed in .att
+ 2) the use attribute is string
+ */
+ AttrType unsup;
+ int unsup_value = 0;
+ attr_init_AttrList(&unsup, attr_list, 14);
+ unsup_value = attr_find(&unsup, 0);
+
+ if (unsup_value != 1)
+ {
+ if (use_value < 0)
+ zebra_setError(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_string);
+ else
+ zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_USE_ATTRIBUTE, use_value);
+ return ZEBRA_FAIL;
+ }
}
return ZEBRA_OK;
}
-/* $Id: t5.c,v 1.22 2007-05-14 13:21:32 adam Exp $
+/* $Id: t5.c,v 1.23 2007-05-25 12:17:11 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
/* exl=1 distance=2 order=0 relation=3 (=), known, unit=word */
YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 1 2 1 3 k 2 my x", 1));
+ /* Non-indexed numeric use, but specified in bib1.att (bug #1142) */
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 x", 0, 114));
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=0 x", 0, 114));
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=1 x", 0, 0));
+ /* Non-indexed numeric use and unspecified in bib1.att */
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=999 x", 0, 114));
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 14=1 x", 0, 114));
+ /* Non-indexed string use attribute */
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf x", 0, 114));
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=0 x", 0, 114));
+ YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=1 x", 0, 0));
+
/* provoke unsupported use attribute */
YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=1 x", 0, 114));
YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=6 x", 0, 114));
-/* $Id: su_codec.c,v 1.2 2007-01-15 15:10:26 adam Exp $
+/* $Id: su_codec.c,v 1.3 2007-05-25 12:17:12 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
int key_SU_encode (int ch, char *out)
{
int i;
+
+ if (ch == -1)
+ {
+ /* unique value .. which is different from ch >= 0 case */
+ /* is used to generate queries with "null" hits, bug #1142 */
+ out[0] = 129;
+ return 1;
+ }
for (i = 0; ch; i++)
{
if (ch >= 64)