1 /* $Id: record.h,v 1.10 2007-06-13 21:29:04 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
40 struct record_metadata {
41 union data_types data;
42 // next item of this name
43 struct record_metadata *next;
46 union data_types * data_types_assign(NMEM nmem,
47 union data_types ** data1,
48 union data_types data2);
52 struct client *client;
53 // Array mirrors list of metadata fields in config
54 struct record_metadata **metadata;
55 // Array mirrors list of sortkey fields in config
56 union data_types **sortkeys;
57 // Next in cluster of merged records
59 // client result set position;
64 struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
65 struct client *client, int position);
67 struct record_metadata * record_metadata_create(NMEM nmem);
69 struct record_metadata * record_metadata_insert(NMEM nmem,
70 struct record_metadata ** rmd,
71 union data_types data);
74 struct record_metadata * record_add_metadata_field_id(NMEM nmem,
75 struct record * record,
77 union data_types data);
80 struct record_metadata * record_add_metadata(NMEM nmem,
81 struct record * record,
82 struct conf_service * service,
84 union data_types data);
87 union data_types * record_assign_sortkey_field_id(NMEM nmem,
88 struct record * record,
90 union data_types data);
93 union data_types * record_assign_sortkey(NMEM nmem,
94 struct record * record,
95 struct conf_service * service,
97 union data_types data);
102 struct record_cluster
104 // Array mirrors list of metadata fields in config
105 struct record_metadata **metadata;
106 union data_types **sortkeys;
109 int *term_frequency_vec;
110 // Set-specific ID for this record
112 struct record *records;
123 * indent-tabs-mode: nil
125 * vim: shiftwidth=4 tabstop=8 expandtab