- rset_null_parms parms;
- parms.rset_term = rset_term_create (term, length, flags, term_type);
- return rset_create (rset_kind_null, &parms);
- }
- if (zi->reg->isams)
- {
- if (no == 1)
- {
- rset_isams_parms parms;
-
- parms.pos = *isam_p;
- parms.is = zi->reg->isams;
- parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- return rset_create (rset_kind_isams, &parms);
- }
- qsort (isam_p, no, sizeof(*isam_p), isams_trunc_cmp);
- }
- else if (zi->reg->isamc)
- {
- if (no == 1)
- {
- rset_isamc_parms parms;
-
- parms.key_size = sizeof(struct it_key);
- parms.cmp = key_compare_it;
- parms.pos = *isam_p;
- parms.is = zi->reg->isamc;
- parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- return rset_create (rset_kind_isamc, &parms);
- }
-#if NEW_TRUNC
- 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;
- parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- 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)
- {
- rset_isamb_parms parms;
- parms.key_size = sizeof(struct it_key);
- parms.cmp = key_compare_it;
- parms.pos = *isam_p;
- parms.is = zi->reg->isamb;
- parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- return rset_create (rset_kind_isamb, &parms);
- }
-#if 1
- else if (no <10000 ) /* FIXME - hardcoded number */
- {
- rset_multior_parms m_parms;
- rset_isamb_parms b_parms;
- int i;
- m_parms.key_size = sizeof(struct it_key);
- m_parms.cmp = key_compare_it;
- m_parms.no_rsets=no;
- m_parms.rsets=xmalloc(sizeof(*m_parms.rsets)*no);
- m_parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- b_parms.key_size = sizeof(struct it_key);
- b_parms.cmp = key_compare_it;
- b_parms.is = zi->reg->isamb;
- /* FIXME - make it so that we can pass a null ptr to term */
- /* needs changes in all rsets, here and there! */
- for (i=0;i<no;i++)
- {
- b_parms.pos = isam_p[i];
- b_parms.rset_term = rset_term_create (term, length, flags,
- term_type);
- m_parms.rsets[i]=rset_create (rset_kind_isamb, &b_parms);
- }
- return rset_create (rset_kind_multior, &m_parms);
- } /* <10000 - rs_multior */
-#endif
- qsort (isam_p, no, sizeof(*isam_p), isamc_trunc_cmp);