Main Page | Data Structures | Directories | File List | Data Fields | Globals

lcn_segments.h File Reference

Routines for reading the segments contained within a lucen index. More...

#include "lcn_types.h"
#include "lcn_directory.h"
#include "lcn_term.h"
#include "lcn_document.h"
#include <apr_pools.h>
#include <apr_tables.h>

Go to the source code of this file.

Typedefs

typedef lcn_segments_t lcn_segments_t
 Opaque structure representing the segments within an index.

Functions

lcn_error_tlcn_segments_read (lcn_segments_t **segments, const lcn_directory_t *directory, apr_pool_t *pool)
 Read in the segments file contained in directory and return it in segments, allocated within pool.
apr_uint64_t lcn_segments_version (const lcn_segments_t *segments)
 Return the version of segments.
unsigned int lcn_segments_count (const lcn_segments_t *segments)
 Return the number of segments within segments.
apr_uint32_t lcn_segments_segsize (const lcn_segments_t *segments, const lcn_char_t *name)
 Return the size (in documents) of segment name within segments.
apr_array_header_t * lcn_segments_names (const lcn_segments_t *segments, apr_pool_t *pool)
 Return the names of the segments within segments, allocated in pool.
apr_uint32_t lcn_segments_max_docs (const lcn_segments_t *segments)
 Return the max docs contained within segments.
lcn_error_tlcn_segments_term_docs (apr_uint32_t *doc_freq, apr_uint32_t **docs, apr_uint32_t **freqs, lcn_segments_t *segments, apr_uint32_t segnum, const lcn_term_t *term, apr_pool_t *pool)
 Return the document freqency doc_freq, document numbers docs, and frequencies freqs of the documents containing term in segment number segnum within segments, using pool for allocation.
lcn_error_tlcn_segments_get_document (lcn_document_t **doc, lcn_segments_t *segs, apr_uint32_t docnum, apr_pool_t *pool)
 Return the document docnum from segs in doc, using pool for allocation.


Detailed Description

Routines for reading the segments contained within a lucen index.

Definition in file lcn_segments.h.


Function Documentation

apr_array_header_t* lcn_segments_names const lcn_segments_t segments,
apr_pool_t *  pool
 

Return the names of the segments within segments, allocated in pool.

The array holds lcn_char_t pointers.

apr_uint64_t lcn_segments_version const lcn_segments_t segments  ) 
 

Return the version of segments.

This can be used to detect if the segment has been modified.


Generated on Sat Mar 26 08:12:11 2005 for Lucene4c by  doxygen 1.4.0