1 /* This file is part of Pazpar2.
2 Copyright (C) 2006-2009 Index Data
4 Pazpar2 is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
41 struct record_metadata {
42 union data_types data;
43 // next item of this name
44 struct record_metadata *next;
47 union data_types * data_types_assign(NMEM nmem,
48 union data_types ** data1,
49 union data_types data2);
53 struct client *client;
54 // Array mirrors list of metadata fields in config
55 struct record_metadata **metadata;
56 // Array mirrors list of sortkey fields in config
57 union data_types **sortkeys;
58 // Next in cluster of merged records
60 // client result set position;
65 struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
66 struct client *client, int position);
68 struct record_metadata * record_metadata_create(NMEM nmem);
70 struct record_metadata * record_metadata_insert(NMEM nmem,
71 struct record_metadata ** rmd,
72 union data_types data);
75 struct record_metadata * record_add_metadata_field_id(NMEM nmem,
76 struct record * record,
78 union data_types data);
81 struct record_metadata * record_add_metadata(NMEM nmem,
82 struct record * record,
83 struct conf_service * service,
85 union data_types data);
88 union data_types * record_assign_sortkey_field_id(NMEM nmem,
89 struct record * record,
91 union data_types data);
94 union data_types * record_assign_sortkey(NMEM nmem,
95 struct record * record,
96 struct conf_service * service,
98 union data_types data);
103 struct record_cluster
105 // Array mirrors list of metadata fields in config
106 struct record_metadata **metadata;
107 union data_types **sortkeys;
110 int *term_frequency_vec;
111 // Set-specific ID for this record
113 struct record *records;
124 * indent-tabs-mode: nil
126 * vim: shiftwidth=4 tabstop=8 expandtab