/* 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_document.h * @brief Routines for manipulating lucene documents */ #ifndef _LCN_DOCUMENT_H #define _LCN_DOCUMENT_H #include "lcn_field.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Opaque structure representing a document in the index. */ typedef struct lcn_document_t lcn_document_t; /** Return an empty document in @a document, allocated from @a pool. */ lcn_error_t * lcn_document_create (lcn_document_t **document, apr_pool_t *pool); /** Add @a field to @a doc. */ lcn_error_t * lcn_document_add_field (lcn_document_t *doc, lcn_field_t *field); lcn_error_t * lcn_document_get_field_by_name (lcn_field_t **field, lcn_document_t *doc, const char *fieldname, apr_pool_t *pool); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _LCN_DOCUMENT_H */