+ facet_field->terms = odr_malloc(odr, 10 * sizeof(*facet_field->terms));
+ while (li->query_look == 't')
+ {
+ if (facet_field->num_terms < 10)
+ {
+ char *es_str = odr_malloc(odr, li->lex_len+1);
+ int es_len = escape_string(es_str, li->lex_buf, li->lex_len);
+ Z_Term *term = z_Term_create(odr, li->term_type, es_str, es_len);
+
+ facet_field->terms[facet_field->num_terms] =
+ (Z_FacetTerm *) odr_malloc(odr, sizeof(Z_FacetTerm));
+ facet_field->terms[facet_field->num_terms]->term = term;
+ facet_field->terms[facet_field->num_terms]->count =
+ odr_intdup(odr, 0);
+ facet_field->num_terms++;
+ }
+ lex(li);
+ }