X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fsession.h;h=0b05afc81b73478d95e01ff778569bf4a97a02f9;hb=20bc8b17d60373c2c93ab6bb777d19dd92ed2960;hp=3e5b6c4c24bcca1def6830b56ebadb476a7e4cfe;hpb=1a8d4a76a67febe45d72f7911e9e706b40f0f4cf;p=pazpar2-moved-to-github.git diff --git a/src/session.h b/src/session.h index 3e5b6c4..0b05afc 100644 --- a/src/session.h +++ b/src/session.h @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2012 Index Data + Copyright (C) 2006-2013 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 @@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +#include "facet_limit.h" #include "termlists.h" #include "reclists.h" #include "http.h" @@ -119,7 +120,8 @@ struct session { YAZ_MUTEX session_mutex; unsigned session_id; int settings_modified; - struct session_sorted_results *sorted_results; + facet_limits_t facet_limits; + struct reclist_sortparms *sorted_results; }; struct statistics { @@ -140,6 +142,7 @@ struct hitsbytarget { Odr_int hits; Odr_int approximation; int diagnostic; + const char *message; const char *addinfo; int records; int filtered; @@ -156,19 +159,23 @@ void session_destroy(struct session *s); void session_init_databases(struct session *s); void statistics(struct session *s, struct statistics *stat); -void session_sort(struct session *se, const char *field, int increasing, - int clear_set); +void session_sort(struct session *se, struct reclist_sortparms *sp); enum pazpar2_error_code session_search(struct session *s, const char *query, const char *startrecs, const char *maxrecs, const char *filter, const char *limit, const char **addinfo, - const char *sort_field, int increasing); + struct reclist_sortparms *sort_parm); struct record_cluster **show_range_start(struct session *s, struct reclist_sortparms *sp, int start, - int *num, int *total, Odr_int *sumhits, Odr_int *approximation); + int *num, int *total, + Odr_int *sumhits, + Odr_int *approximation, + void (*ready)(void *data), + struct http_channel *chan); +int session_fetch_more(struct session *s); void show_range_stop(struct session *s, struct record_cluster **recs); struct record_cluster *show_single_start(struct session *s, const char *id, @@ -185,6 +192,7 @@ int ingest_record(struct client *cl, const char *rec, int record_no, NMEM nmem); void session_alert_watch(struct session *s, int what); void add_facet(struct session *s, const char *type, const char *value, int count); +int session_check_cluster_limit(struct session *se, struct record_cluster *rec); void perform_termlist(struct http_channel *c, struct session *se, const char *name, int num, int version); void session_log(struct session *s, int level, const char *fmt, ...) @@ -194,13 +202,6 @@ void session_log(struct session *s, int level, const char *fmt, ...) ; #endif -struct session_sorted_results { - const char *field; - int increasing; - int position; - struct session_sorted_results *next; -}; - /* * Local variables: * c-basic-offset: 4