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

lcn_query.h File Reference

Routines for working with queries. More...

#include "lcn_types.h"
#include "lcn_scorer.h"
#include "lcn_term.h"

Go to the source code of this file.

Typedefs

typedef lcn_query_t lcn_query_t
 Abstract query object.

Enumerations

enum  lcn_boolean_clause_occur_t {
  LCN_MUST,
  LCN_SHOULD,
  LCN_MUST_NOT
}
 An indication of what requirement is placed on a particular part of a boolean query. More...

Functions

lcn_error_tlcn_term_query_create (lcn_query_t **query, lcn_term_t *term, apr_pool_t *pool)
 Create a query that matches term, allocated in pool.
lcn_error_tlcn_boolean_query_create (lcn_query_t **query, apr_pool_t *pool)
 Create a query that matches a number of other queries, each of which either MUST occur, SHOULD occur, or MUST NOT occur in the documents matched, the query is allocated in pool.
lcn_error_tlcn_boolean_query_add (lcn_query_t *query, lcn_query_t *clause, lcn_boolean_clause_occur_t occur)
 Add clause to query, with occur as the specification for whether it is required or not.
lcn_query_tlcn_weight_query (lcn_weight_t *weight)
 Return weight's underlying query.
float lcn_weight_value (lcn_weight_t *weight)
 Return the value of weight.
lcn_error_tlcn_query_weight (lcn_weight_t **weight, lcn_query_t *query, apr_pool_t *pool)
 Create an weight from query.
lcn_error_tlcn_weight_scorer (lcn_scorer_t **scorer, lcn_weight_t *weight, lcn_index_t *index, apr_pool_t *pool)
 Return a scorer for weight run over index, allocated in pool.


Detailed Description

Routines for working with queries.

Definition in file lcn_query.h.


Enumeration Type Documentation

enum lcn_boolean_clause_occur_t
 

An indication of what requirement is placed on a particular part of a boolean query.

Enumeration values:
LCN_MUST  The query must match.
LCN_SHOULD  At least one of the queries with this occur must match.
LCN_MUST_NOT  The query must not match.

Definition at line 52 of file lcn_query.h.


Function Documentation

lcn_error_t* lcn_boolean_query_add lcn_query_t query,
lcn_query_t clause,
lcn_boolean_clause_occur_t  occur
 

Add clause to query, with occur as the specification for whether it is required or not.

Note:
all clauses that are added to query must be allocated from a pool that lives at least as long as the pool used to allocate query, or the behavior is undefined.

lcn_error_t* lcn_weight_scorer lcn_scorer_t **  scorer,
lcn_weight_t weight,
lcn_index_t index,
apr_pool_t *  pool
 

Return a scorer for weight run over index, allocated in pool.

Note:
the Java Lucene version of this stuff works on a Weight, not a Query, but that's mainly because you are supposed to be able to reuse a Query, so we can make that split later.


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