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

lcn_term.h

Go to the documentation of this file.
00001 /* Copyright 2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /**
00018  * @file lcn_term.h
00019  * @brief Routines for handling lucene terms
00020  */
00021 
00022 #ifndef _LCN_TERM_H
00023 #define _LCN_TERM_H
00024 
00025 #include "lcn_types.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif /* __cplusplus */
00030 
00031 /** A lucene term. */
00032 typedef struct {
00033   lcn_char_t *contents;  /**< The actual contents of the term */
00034   lcn_char_t *field;     /**< The field the term is found in */
00035 } lcn_term_t;
00036 
00037 /** Create a new term with contents @a contents and field @a field, allocated
00038  * in @a pool.
00039  */
00040 lcn_term_t *
00041 lcn_term_create (const lcn_char_t *contents,
00042                  const lcn_char_t *field,
00043                  apr_pool_t *pool);
00044 
00045 /** Like @c lcn_term_create, but with cstring arguments. */
00046 lcn_term_t *
00047 lcn_term_create_cstring (const char *contents,
00048                          const char *field,
00049                          apr_pool_t *pool);
00050 
00051 /** Compare terms @a one and @a two, returning an integer less than, equal to,
00052  * or greater than if @a one is less than, equal to, or greater than @a two.
00053  */
00054 int lcn_term_compare (const lcn_term_t *one, const lcn_term_t *two);
00055 
00056 #ifdef __cplusplus
00057 }
00058 #endif /* __cplusplus */
00059 
00060 #endif /* _LCN_TERM_H */

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