+ ZebraHandle zh = zebra_open(zs, 0);
+
+ YAZ_CHECK(tl_init_data(zh, myrec));
+
+ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any the", 3));
+ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the art", 1));
+ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and den gamle", 0));
+ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the gamle", 1));
+ YAZ_CHECK(tl_query(zh, "@attr 4=3 @attr 1=any @and the of", 0));
+
+ /* verify that we get these records exactly */
+ ids[0] = 24338;
+ ids[1] = 24339;
+ ids[2] = 24340;
+ YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 3, ids));
+
+ /* limit to 125061 */
+ limits[0] = 125061;
+ limits[1] = 0;
+ zebra_set_limit(zh, 0, limits);
+ ids[0] = 24339;
+ YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 1, ids));
+
+ /* limit to 125060, 125061 */
+ limits[0] = 125061;
+ limits[1] = 125060;
+ limits[2] = 0;
+ zebra_set_limit(zh, 0, limits);
+ ids[0] = 24338;
+ ids[1] = 24339;
+ YAZ_CHECK(tl_meta_query(zh, "@attr 4=3 @attr 1=any mand", 2, ids));