1 /* $Id: record.h,v 1.12 2007-09-10 16:25:50 adam Exp $
2 Copyright (c) 2006-2007, Index Data.
4 This file is part of Pazpar2.
6 Pazpar2 is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with Pazpar2; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
43 struct record_metadata {
44 union data_types data;
45 // next item of this name
46 struct record_metadata *next;
49 union data_types * data_types_assign(NMEM nmem,
50 union data_types ** data1,
51 union data_types data2);
55 struct client *client;
56 // Array mirrors list of metadata fields in config
57 struct record_metadata **metadata;
58 // Array mirrors list of sortkey fields in config
59 union data_types **sortkeys;
60 // Next in cluster of merged records
62 // client result set position;
67 struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
68 struct client *client, int position);
70 struct record_metadata * record_metadata_create(NMEM nmem);
72 struct record_metadata * record_metadata_insert(NMEM nmem,
73 struct record_metadata ** rmd,
74 union data_types data);
77 struct record_metadata * record_add_metadata_field_id(NMEM nmem,
78 struct record * record,
80 union data_types data);
83 struct record_metadata * record_add_metadata(NMEM nmem,
84 struct record * record,
85 struct conf_service * service,
87 union data_types data);
90 union data_types * record_assign_sortkey_field_id(NMEM nmem,
91 struct record * record,
93 union data_types data);
96 union data_types * record_assign_sortkey(NMEM nmem,
97 struct record * record,
98 struct conf_service * service,
100 union data_types data);
105 struct record_cluster
107 // Array mirrors list of metadata fields in config
108 struct record_metadata **metadata;
109 union data_types **sortkeys;
112 int *term_frequency_vec;
113 // Set-specific ID for this record
115 struct record *records;
126 * indent-tabs-mode: nil
128 * vim: shiftwidth=4 tabstop=8 expandtab