+ len = wrbuf_len(wrbuf);
+ if (len > SORT_MAX_TERM)
+ {
+ len = SORT_MAX_TERM;
+ wrbuf_buf(wrbuf)[len-1] = '\0';
+ }
+ memcpy(s.st.term, wrbuf_buf(wrbuf), len);
+ s.st.length = len;
+ s.st.sysno = si->sysno;
+ s.st.section_id = 0;
+ s.no = 1;
+ s.insert_flag = 1;
+ isamc_i.clientData = &s;
+ isamc_i.read_item = sort_term_code_read;
+
+ isamb_merge(sf->u.isamb, &sf->isam_p, &isamc_i);
+ sf->no_inserted++;
+ }
+ break;
+ case ZEBRA_SORT_TYPE_MULTI:
+ assert(sf->u.isamb);
+ if (sf->no_inserted == 0)
+ {
+ struct sort_term_stream s;
+ ISAMC_I isamc_i;
+ len = wrbuf_len(wrbuf);
+ if (len > SORT_MAX_MULTI)
+ {
+ len = SORT_MAX_MULTI;
+ wrbuf_buf(wrbuf)[len-1] = '\0';
+ }
+ memcpy(s.st.term, wrbuf_buf(wrbuf), len);
+ s.st.length = len;