1 /* This file is part of Pazpar2.
2 Copyright (C) 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
42 struct record_metadata_attr {
45 struct record_metadata_attr *next;
48 struct record_metadata {
49 union data_types data;
50 // next item of this name
51 struct record_metadata *next;
52 struct record_metadata_attr *attributes;
55 union data_types * data_types_assign(NMEM nmem,
56 union data_types ** data1,
57 union data_types data2);
61 struct client *client;
62 // Array mirrors list of metadata fields in config
63 struct record_metadata **metadata;
64 // Array mirrors list of sortkey fields in config
65 union data_types **sortkeys;
66 // Next in cluster of merged records
68 // client result set position;
70 // score for ranking, either native or our TF/IDF, or other
77 struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
78 struct client *client, int position);
80 struct record_metadata * record_metadata_create(NMEM nmem);
82 int record_compare(struct record *r1, struct record *r2, struct conf_service *service);
86 // Array mirrors list of metadata fields in config
87 struct record_metadata **metadata;
88 union data_types **sortkeys;
90 struct record_metadata_attr *merge_keys;
93 int *term_frequency_vec;
94 float *term_frequency_vecf;
95 // Set-specific ID for this record
97 int retrieval_position;
98 WRBUF relevance_explain1;
99 WRBUF relevance_explain2;
100 struct record *records;
101 struct record_cluster *sorted_next;
102 struct reclist_sortparms *sort_parms;
110 * c-file-style: "Stroustrup"
111 * indent-tabs-mode: nil
113 * vim: shiftwidth=4 tabstop=8 expandtab