1 /* This file is part of Pazpar2.
2 Copyright (C) 2006-2010 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
39 struct record_metadata_attr {
42 struct record_metadata_attr *next;
45 struct record_metadata {
46 union data_types data;
47 // next item of this name
48 struct record_metadata *next;
49 struct record_metadata_attr *attributes;
52 union data_types * data_types_assign(NMEM nmem,
53 union data_types ** data1,
54 union data_types data2);
58 struct client *client;
59 // Array mirrors list of metadata fields in config
60 struct record_metadata **metadata;
61 // Array mirrors list of sortkey fields in config
62 union data_types **sortkeys;
63 // Next in cluster of merged records
65 // client result set position;
70 struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
71 struct client *client, int position);
73 struct record_metadata * record_metadata_create(NMEM nmem);
75 struct record_metadata * record_metadata_insert(NMEM nmem,
76 struct record_metadata ** rmd,
77 union data_types data);
80 struct record_metadata * record_add_metadata_field_id(NMEM nmem,
81 struct record * record,
83 union data_types data);
86 struct record_metadata * record_add_metadata(NMEM nmem,
87 struct record * record,
88 struct conf_service * service,
90 union data_types data);
93 union data_types * record_assign_sortkey_field_id(NMEM nmem,
94 struct record * record,
96 union data_types data);
99 union data_types * record_assign_sortkey(NMEM nmem,
100 struct record * record,
101 struct conf_service * service,
103 union data_types data);
108 struct record_cluster
110 // Array mirrors list of metadata fields in config
111 struct record_metadata **metadata;
112 union data_types **sortkeys;
115 int *term_frequency_vec;
116 int *term_frequency_vec_tmp;
117 float *term_frequency_vecf;
118 // Set-specific ID for this record
120 struct record *records;
131 * c-file-style: "Stroustrup"
132 * indent-tabs-mode: nil
134 * vim: shiftwidth=4 tabstop=8 expandtab