+ while (icu_chain_next_token(zm->icu_chain, &status))
+ {
+ assert(U_SUCCESS(status));
+ *result_buf = icu_chain_token_sortkey(zm->icu_chain);
+ assert(*result_buf);
+
+ *result_len = strlen(*result_buf);
+
+ if (zm->debug)
+ {
+ wrbuf_rewind(zm->print_str);
+ wrbuf_verbose_str(zm->print_str, *result_buf, *result_len);
+ yaz_log(YLOG_LOG, "output %s", wrbuf_cstr(zm->print_str));
+ }
+
+ if (**result_buf != '\0')
+ return 1;
+ }
+ assert(U_SUCCESS(status));