+ odr_strdup(encode, wrbuf_cstr(wrbuf)),
+ &v);
+ }
+ if (attr_values.start > 1)
+ {
+ Odr_int v = attr_values.start - 1;
+ wrbuf_rewind(wrbuf);
+ wrbuf_printf(wrbuf, "f.%s.facet.offset", attr_values.useattr);
+ yaz_add_name_value_int(encode, name, value, i,
+ odr_strdup(encode, wrbuf_cstr(wrbuf)),
+ &v);
+ }
+ if (attr_values.sortorder == 1)
+ {
+ wrbuf_rewind(wrbuf);
+ wrbuf_printf(wrbuf, "f.%s.facet.sort", attr_values.useattr);
+ yaz_add_name_value_str(encode, name, value, i,
+ odr_strdup(encode, wrbuf_cstr(wrbuf)),
+ "index");