/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ parcel Lucy; /** Write postings data to an index. * * PostingListWriter writes frequency and positional data files, plus feeds * data to LexiconWriter. */ class Lucy::Index::PostingListWriter cnick PListWriter inherits Lucy::Index::DataWriter { LexiconWriter *lex_writer; VArray *pools; MemoryPool *mem_pool; OutStream *lex_temp_out; OutStream *post_temp_out; OutStream *skip_out; uint32_t mem_thresh; inert int32_t current_file_format; inert incremented PostingListWriter* new(Schema *schema, Snapshot *snapshot, Segment *segment, PolyReader *polyreader, LexiconWriter *lex_writer); inert PostingListWriter* init(PostingListWriter *self, Schema *schema, Snapshot *snapshot, Segment *segment, PolyReader *polyreader, LexiconWriter *lex_writer); /** Test only. */ inert void set_default_mem_thresh(size_t mem_thresh); public void Add_Inverted_Doc(PostingListWriter *self, Inverter *inverter, int32_t doc_id); public void Add_Segment(PostingListWriter *self, SegReader *reader, I32Array *doc_map = NULL); public void Finish(PostingListWriter *self); public int32_t Format(PostingListWriter *self); public void Destroy(PostingListWriter *self); }