};
static int checkForLeftTruncation(Z_AttributeList *attributes) {
- return checkForTruncation(1, attributes);
+ return checkForTruncation(2, attributes);
}
static int checkForRightTruncation(Z_AttributeList *attributes) {
- return checkForTruncation(2, attributes);
+ return checkForTruncation(1, attributes);
};
static int rpn2cql_simple(cql_transform_t ct,
if (truncation <= 3)
return ((int) truncation & flag);
}
- /* Complex: Shouldn't happen */
+ else if (ae->which == Z_AttributeValue_complex) {
+ //yaz_log(YLOG_DEBUG, "Z_Attribute_complex");
+ /* Complex: Shouldn't happen */
+ }
}
}
/* No truncation or unsupported */
};
static int checkForLeftTruncation(Z_AttributeList *attributes) {
- return checkForTruncation(1, attributes);
+ return checkForTruncation(2, attributes);
}
static int checkForRightTruncation(Z_AttributeList *attributes) {
- return checkForTruncation(2, attributes);
+ return checkForTruncation(1, attributes);
};
static int rpn2solr_simple(solr_transform_t ct,
YAZ_CHECK(compare(ct, "@attr 1=4 abc", "dc.title=abc"));
YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=108 abc", "dc.title=/exact abc"));
YAZ_CHECK(compare(ct, "@attr 1=4 @attr 3=1 @attr 6=1 abc", "dc.title=abc"));
- YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=1 @attr 6=1 abc",
- "dc.title=abc"));
+ YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=1 @attr 6=1 abc", "dc.title=abc"));
YAZ_CHECK(compare(ct, "@attr 1=1016 abc", "abc"));
+ /* Date tests */
YAZ_CHECK(compare(ct, "@attr 2=1 @attr 1=30 1980", "dc.date<1980"));
YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=3 1980", "dc.date=1980"));
YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=5 1980", "dc.date>1980"));
YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=2 1980", "dc.date<=1980"));
YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=4 1980", "dc.date>=1980"));
-
+ /* Truncation */
+ YAZ_CHECK(compare(ct, "@attr 5=1 water", "water*"));
+ YAZ_CHECK(compare(ct, "@attr 5=2 water", "*water"));
+ YAZ_CHECK(compare(ct, "@attr 5=3 water", "*water*"));
+ /* Other */
YAZ_CHECK(compare(ct, "@attr 2=103 @attr 1=_ALLRECORDS 1", "cql.allRecords=1"));
YAZ_CHECK(compare(ct, "@attr 1=500 abc", 0));
cql_transform_close(ct);
solr_transform_define_pattern(ct, "index.foo", "1=bar");
YAZ_CHECK(compare(ct, "@attr 1=bar abc", "foo:abc"));
+
+ /* Truncation */
+ YAZ_CHECK(compare(ct, "@attr 5=1 water", "water*"));
+ YAZ_CHECK(compare(ct, "@attr 5=2 water", "*water"));
+ YAZ_CHECK(compare(ct, "@attr 5=3 water", "*water*"));
+
/*
YAZ_CHECK(compare(ct, "@or @attr 1=1016 water @attr 7=1 @attr 1=4 0", "any:water rank:??");
*/
$(NSIS) yaz.win32.nsi
dist64: yaz.win64.nsi yaz.nsi distclean
- nmake DEBUG=0 HAVE_LIBXSLT=1 HAVE_LIBXML2=1 HAVE_ICONV=0 HAVE_ICU=1 LIBXML2_DIR=c:\libxml2-2.7.8.win64 LIBXSLT_DIR=c:\libxslt-1.1.26.win64 ICU_LIB=\icu64\lib64 ICU_INCLUDE=\icu64\include ICU_BIN=\icu64\bin64
+ nmake make64
$(NSIS) yaz.win64.nsi
+make64:
+ nmake DEBUG=0 HAVE_LIBXSLT=1 HAVE_LIBXML2=1 HAVE_ICONV=0 HAVE_ICU=1 LIBXML2_DIR=c:\libxml2-2.7.8.win64 LIBXSLT_DIR=c:\libxslt-1.1.26.win64 ICU_LIB=\icu64\lib64 ICU_INCLUDE=\icu64\include ICU_BIN=\icu64\bin64
+
distclean:
nmake DEBUG=1 clean
nmake DEBUG=0 clean
InstType "Full (w/ Source)"
InstType "Lite (w/o Source)"
-InstallDir "$PROGRAMFILES\YAZ"
InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" ""
!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\msvc*90.dll"
!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
+InstallDir "$PROGRAMFILES\YAZ"
+
!include yaz.nsi
!define VS_RUNTIME_DLL "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\amd64\Microsoft.VC90.CRT\msvc*90.dll"
!define VS_RUNTIME_MANIFEST "c:\Program Files\Microsoft Visual Studio 9.0\VC\redist\amd64\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest"
+InstallDir "$PROGRAMFILES64\YAZ"
+
!include yaz.nsi