pazpar2  1.13.0
Go to the documentation of this file.
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
7 version.
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
12 for more details.
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
18 */
20 #ifndef RECLISTS_H
21 #define RECLISTS_H
23 #include "pazpar2_config.h"
24 #include "record.h"
25 #include "relevance.h"
27 struct reclist;
29 // This is a recipe for sorting. First node in list has highest priority
31 {
32  int offset;
35  char *name;
37 };
39 struct reclist *reclist_create(NMEM);
40 void reclist_destroy(struct reclist *l);
41 void reclist_limit(struct reclist *l, struct session *session, int lazy);
42 struct record_cluster *reclist_insert(struct reclist *tl,
43  struct relevance *r,
44  struct conf_service *service,
45  struct record *record,
47  int *total);
48 void reclist_sort(struct reclist *l, struct reclist_sortparms *parms);
49 struct record_cluster *reclist_read_record(struct reclist *l);
50 void reclist_enter(struct reclist *l);
51 void reclist_leave(struct reclist *l);
52 void reclist_rewind(struct reclist *l);
53 struct reclist_sortparms *reclist_parse_sortparms(NMEM nmem, const char *parms,
54  struct conf_service *service);
56 int reclist_get_num_records(struct reclist *l);
57 struct record_cluster *reclist_get_cluster(struct reclist *l, int i);
58 int reclist_sortparms_cmp(struct reclist_sortparms *sort1, struct reclist_sortparms *sort2);
60 #endif
62 /*
63  * Local variables:
64  * c-basic-offset: 4
65  * c-file-style: "Stroustrup"
66  * indent-tabs-mode: nil
67  * End:
68  * vim: shiftwidth=4 tabstop=8 expandtab
69  */
void reclist_limit(struct reclist *l, struct session *session, int lazy)
Definition: reclists.c:259
struct record_cluster * reclist_read_record(struct reclist *l)
Definition: reclists.c:331
Definition: record.h:60
struct reclist_sortparms * reclist_parse_sortparms(NMEM nmem, const char *parms, struct conf_service *service)
Definition: reclists.c:71
void reclist_enter(struct reclist *l)
Definition: reclists.c:343
struct record_cluster * reclist_get_cluster(struct reclist *l, int i)
void reclist_destroy(struct reclist *l)
Definition: reclists.c:380
struct record_metadata_attr * merge_keys
Definition: record.h:90
int reclist_get_num_records(struct reclist *l)
Definition: reclists.c:400
struct record_cluster * reclist_insert(struct reclist *tl, struct relevance *r, struct conf_service *service, struct record *record, struct record_metadata_attr *merge_keys, int *total)
Definition: reclists.c:482
void reclist_sort(struct reclist *l, struct reclist_sortparms *parms)
Definition: reclists.c:298
struct reclist * reclist_create(NMEM)
Definition: reclists.c:362
int reclist_sortparms_cmp(struct reclist_sortparms *sort1, struct reclist_sortparms *sort2)
Definition: reclists.c:564
enum conf_metadata_type type
Definition: reclists.h:33
void reclist_rewind(struct reclist *l)
Definition: reclists.c:356
struct reclist_sortparms * next
Definition: reclists.h:36
void reclist_leave(struct reclist *l)
Definition: reclists.c:350