Package org.apache.lucene.codecs

Examples of org.apache.lucene.codecs.BlockTreeTermsWriter$TermsWriter


      docsWriter = wrappedPostingsBaseFormat.postingsWriterBase(state);

      // Terms that have <= freqCutoff number of docs are
      // "pulsed" (inlined):
      pulsingWriter = new PulsingPostingsWriter(state, freqCutoff, docsWriter);
      FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter, minBlockSize, maxBlockSize);
      success = true;
      return ret;
    } finally {
      if (!success) {
        IOUtils.closeWhileHandlingException(docsWriter, pulsingWriter);
View Full Code Here


      // pluggable?  Ie so that this codec would record which
      // index impl was used, and switch on loading?
      // Or... you must make a new Codec for this?
      boolean success = false;
      try {
        FieldsConsumer ret = new BlockTreeTermsWriter(state, docs, minBlockSize, maxBlockSize);
        success = true;
        return ret;
      } finally {
        if (!success) {
          docs.close();
View Full Code Here

      final int minTermsInBlock = TestUtil.nextInt(random, 2, 100);
      final int maxTermsInBlock = Math.max(2, (minTermsInBlock-1)*2 + random.nextInt(100));

      boolean success = false;
      try {
        fields = new BlockTreeTermsWriter(state, postingsWriter, minTermsInBlock, maxTermsInBlock);
        success = true;
      } finally {
        if (!success) {
          postingsWriter.close();
        }
View Full Code Here

    try {
      docsWriter = new Lucene41PostingsWriter(state);

      pulsingWriterInner = new PulsingPostingsWriter(state, 2, docsWriter);
      pulsingWriter = new PulsingPostingsWriter(state, 1, pulsingWriterInner);
      FieldsConsumer ret = new BlockTreeTermsWriter(state, pulsingWriter,
          BlockTreeTermsWriter.DEFAULT_MIN_BLOCK_SIZE, BlockTreeTermsWriter.DEFAULT_MAX_BLOCK_SIZE);
      success = true;
      return ret;
    } finally {
      if (!success) {
View Full Code Here

  public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException {
    PostingsWriterBase postingsWriter = new Lucene41PostingsWriter(state);

    boolean success = false;
    try {
      FieldsConsumer ret = new BlockTreeTermsWriter(state,
                                                    postingsWriter,
                                                    minTermBlockSize,
                                                    maxTermBlockSize);
      success = true;
      return ret;
View Full Code Here

TOP

Related Classes of org.apache.lucene.codecs.BlockTreeTermsWriter$TermsWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.