+ pp2_relevance_token_destroy(prt);
+
+ if (wrbuf_len(facet_wrbuf))
+ {
+ int i;
+ for (i = 0; i < s->num_termlists; i++)
+ if (!strcmp(s->termlists[i].name, type))
+ break;
+ if (i == s->num_termlists)
+ {
+ if (i == SESSION_MAX_TERMLISTS)
+ {
+ session_log(s, YLOG_FATAL, "Too many termlists");
+ wrbuf_destroy(facet_wrbuf);
+ return;
+ }
+
+ s->termlists[i].name = nmem_strdup(s->nmem, type);
+ s->termlists[i].termlist
+ = termlist_create(s->nmem, TERMLIST_HIGH_SCORE);
+ s->num_termlists = i + 1;
+ }
+
+ session_log(s, YLOG_DEBUG, "Session: facets for %s: %s norm:%s (%d)",
+ type, value, wrbuf_cstr(facet_wrbuf), count);
+ termlist_insert(s->termlists[i].termlist, wrbuf_cstr(facet_wrbuf),
+ count);
+ }
+ wrbuf_destroy(facet_wrbuf);