/* Copyright 2005 The Apache Software Foundation or its licensors, as * applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file lcn_field.h * @brief Routines for manipulating lucene fields */ #ifndef _LCN_FIELD_H #define _LCN_FIELD_H #include "lcn_error.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Opaque structure representing a field in a document. */ typedef struct lcn_field_t lcn_field_t; /** Create a text field. */ lcn_error_t * lcn_field_text (lcn_field_t **f, const char *name, const char *value, apr_pool_t *pool); /** Create a keyword field. */ lcn_error_t * lcn_field_keyword (lcn_field_t **f, const char *name, const char *value, apr_pool_t *pool); /** Create an unindexed field. */ lcn_error_t * lcn_field_unindexed (lcn_field_t **f, const char *name, const char *value, apr_pool_t *pool); /** Return the name of field @a f in @a name, allocated in @a pool. */ lcn_error_t * lcn_field_name (char **name, const lcn_field_t *f, apr_pool_t *pool); /** Return the content of field @a f in @a content, allocated in @a pool. */ lcn_error_t * lcn_field_content (char **content, const lcn_field_t *f, apr_pool_t *pool); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _LCN_FIELD_H */