- if (no == 1)
- return rsisamc_create(rset_nmem, kctrl,
- zi->reg->isamc, *isam_p);
-
-#if 0 /* NEW_TRUNC */ /* FIXME - Use the new multi_or instead !! */
- else if (no < 10000)
- {
- rset_m_or_parms parms;
-
- parms.key_size = sizeof(struct it_key);
- parms.cmp = key_compare_it;
- parms.isc = zi->reg->isamc;
- parms.isam_positions = isam_p;
- parms.no_isam_positions = no;
- parms.no_save_positions = 100000;
- return rset_create (rset_kind_m_or, &parms);
- }
-#endif
- qsort (isam_p, no, sizeof(*isam_p), isamc_trunc_cmp);
- }
- else if (zi->reg->isamb)
- {
- if (no == 1)
- return rsisamb_create(rset_nmem,kctrl,
- zi->reg->isamb, *isam_p);
- else if (no <10000 ) /* FIXME - hardcoded number */
- {
- RSET r;
- RSET *rsets=xmalloc(no*sizeof(RSET)); /* use nmem! */
- int i;
- for (i=0;i<no;i++)
- rsets[i]=rsisamb_create(rset_nmem, kctrl,
- zi->reg->isamb, isam_p[i] );
- r=rsmultior_create( rset_nmem, kctrl, no, rsets);
- xfree(rsets);
- }
- qsort (isam_p, no, sizeof(*isam_p), isamc_trunc_cmp);
+ RSET r;
+ RSET *rsets = xmalloc(no*sizeof(RSET)); /* use nmem! */
+ int i;
+ for (i = 0; i<no; i++)
+ rsets[i] = rsisamb_create(rset_nmem, kctrl, scope,
+ zh->reg->isamb, isam_p[i],
+ 0 /* termid */);
+ r = rset_create_or(rset_nmem, kctrl, scope,
+ termid, no, rsets);
+ xfree(rsets);
+ return r;