projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into paz-927
[pazpar2-moved-to-github.git]
/
src
/
record.h
diff --git
a/src/record.h
b/src/record.h
index
b7efc2e
..
cb8df1e
100644
(file)
--- a/
src/record.h
+++ b/
src/record.h
@@
-1,5
+1,5
@@
/* This file is part of Pazpar2.
/* This file is part of Pazpar2.
- Copyright (C) 2006-2011 Index Data
+ Copyright (C) Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-28,11
+28,13
@@
union data_types {
struct {
const char *disp;
const char *sort;
struct {
const char *disp;
const char *sort;
+ const char *snippet;
} text;
struct {
int min;
int max;
} number;
} text;
struct {
int min;
int max;
} number;
+ double fnumber;
};
};
@@
-45,25
+47,29
@@
struct record_metadata_attr {
struct record_metadata {
union data_types data;
// next item of this name
struct record_metadata {
union data_types data;
// next item of this name
- struct record_metadata *next;
+ struct record_metadata *next;
struct record_metadata_attr *attributes;
};
struct record_metadata_attr *attributes;
};
-union data_types * data_types_assign(NMEM nmem,
- union data_types ** data1,
+union data_types * data_types_assign(NMEM nmem,
+ union data_types ** data1,
union data_types data2);
struct record {
struct client *client;
// Array mirrors list of metadata fields in config
union data_types data2);
struct record {
struct client *client;
// Array mirrors list of metadata fields in config
- struct record_metadata **metadata;
+ struct record_metadata **metadata;
// Array mirrors list of sortkey fields in config
union data_types **sortkeys;
// Array mirrors list of sortkey fields in config
union data_types **sortkeys;
- // Next in cluster of merged records
- struct record *next;
+ // Next in cluster of merged records
+ struct record *next;
// client result set position;
int position;
// client result set position;
int position;
+ // score for ranking, either native or our TF/IDF, or other
+ double score;
+ // checksum
+ unsigned checksum;
};
};
@@
-77,16
+83,21
@@
int record_compare(struct record *r1, struct record *r2, struct conf_service *se
struct record_cluster
{
// Array mirrors list of metadata fields in config
struct record_cluster
{
// Array mirrors list of metadata fields in config
- struct record_metadata **metadata;
+ struct record_metadata **metadata;
union data_types **sortkeys;
union data_types **sortkeys;
- char *merge_key;
+ // char *merge_key;
+ struct record_metadata_attr *merge_keys;
+
int relevance_score;
int *term_frequency_vec;
int relevance_score;
int *term_frequency_vec;
- int *term_frequency_vec_tmp;
float *term_frequency_vecf;
// Set-specific ID for this record
char *recid;
float *term_frequency_vecf;
// Set-specific ID for this record
char *recid;
+ WRBUF relevance_explain1;
+ WRBUF relevance_explain2;
struct record *records;
struct record *records;
+ struct record_cluster *sorted_next;
+ struct reclist_sortparms *sort_parms;
};
#endif // RECORD_H
};
#endif // RECORD_H