2
** This program and library is free software; you can redistribute it and/or
3
** modify it under the terms of the GNU General Public License
4
** as published by the Free Software Foundation; either version 2
5
** of the License, or any later version.
7
** This program is distributed in the hope that it will be useful,
8
** but WITHOUT ANY WARRANTY; without even the implied warranty of
9
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
** GNU (Library) General Public License for more details.
12
** You should have received a copy of the GNU (Library) General Public License
13
** along with this program; if not, write to the Free Software
14
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3
$Id: merge.c,v 1.94 2005/05/12 15:41:05 karman Exp $
6
This file is part of Swish-e.
8
Swish-e is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
13
Swish-e is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with Swish-e; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
See the COPYING file that accompanies the Swish-e distribution for details
23
of the GNU GPL and the special exception available for linking against
26
** Mon May 9 15:07:32 CDT 2005
15
29
**-----------------------------------------------------------------
17
31
** rewritten from scratch - moseley Oct 17, 2001
368
382
read_header(sw_input, out_header, sw_input->indexlist->DB);
370
384
out_header->totalfiles = 0;
386
/* $$$ This needs to be fixed */
371
387
out_header->removedfiles = 0;
388
out_header->removed_word_positions = 0;
372
389
out_header->totalwords = 0;
374
391
freeMetaEntries( out_header );
618
/******************************************************************************
619
* load_filename_sort -
621
* Creates an array used for sorting file names.
622
* Uses the pre-sorted array, if available, otherwise, creates one.
624
*******************************************************************************/
602
626
static void load_filename_sort( SWISH *sw, IndexFILE *cur_index )
621
645
cur_index->modified_meta = getPropNameByName( &cur_index->header, AUTOPROPERTY_LASTMODIFIED );
649
* Since USE_PRESORT_ARRAY has a different internal format that what is generated
650
* by CreatePropeSortArray() we must ALWAYS create an actual integer
651
* array total_files long.
653
* $$$ The problem is that with USE_PRESORT_ARRAY the format is different
654
* before and after saving the array to disk
657
#ifdef USE_PRESORT_ARRAY
624
660
if ( !LoadSortedProps( cur_index, path_meta ) )
627
665
memset( &fi, 0, sizeof( FileRec ));