00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _LCN_SEGMENTS_H
00023 #define _LCN_SEGMENTS_H
00024
00025 #include "lcn_types.h"
00026 #include "lcn_directory.h"
00027 #include "lcn_term.h"
00028 #include "lcn_document.h"
00029
00030 #include <apr_pools.h>
00031 #include <apr_tables.h>
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037
00038 typedef struct lcn_segments_t lcn_segments_t;
00039
00040
00041
00042
00043 lcn_error_t *
00044 lcn_segments_read (lcn_segments_t **segments,
00045 const lcn_directory_t *directory,
00046 apr_pool_t *pool);
00047
00048
00049
00050
00051
00052 apr_uint64_t lcn_segments_version (const lcn_segments_t *segments);
00053
00054
00055 unsigned int lcn_segments_count (const lcn_segments_t *segments);
00056
00057
00058 apr_uint32_t lcn_segments_segsize (const lcn_segments_t *segments,
00059 const lcn_char_t *name);
00060
00061
00062
00063
00064
00065 apr_array_header_t *
00066 lcn_segments_names (const lcn_segments_t *segments, apr_pool_t *pool);
00067
00068
00069 apr_uint32_t
00070 lcn_segments_max_docs (const lcn_segments_t *segments);
00071
00072
00073
00074
00075
00076 lcn_error_t *
00077 lcn_segments_term_docs (apr_uint32_t *doc_freq,
00078 apr_uint32_t **docs,
00079 apr_uint32_t **freqs,
00080 lcn_segments_t *segments,
00081 apr_uint32_t segnum,
00082 const lcn_term_t *term,
00083 apr_pool_t *pool);
00084
00085
00086
00087
00088 lcn_error_t *
00089 lcn_segments_get_document (lcn_document_t **doc,
00090 lcn_segments_t *segs,
00091 apr_uint32_t docnum,
00092 apr_pool_t *pool);
00093
00094 #ifdef __cplusplus
00095 }
00096 #endif
00097
00098 #endif