You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/02/08 14:31:52 UTC
[13/53] [abbrv] lucenenet git commit: Lucene.Net.Core: Renamed all
type-derived properties and methods from Short, Int, Long,
and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Lucene.Net.Core: Renamed all type-derived properties and methods from Short, Int, Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f7432173
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f7432173
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f7432173
Branch: refs/heads/api-work
Commit: f7432173e9255f67d1aea4597c13713d4ac43a15
Parents: a3e54be
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Feb 7 13:07:03 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Feb 8 21:08:20 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hunspell/Dictionary.cs | 12 +-
.../Analysis/Hunspell/Stemmer.cs | 28 +--
.../Analysis/Payloads/IntegerEncoder.cs | 2 +-
.../Analysis/Payloads/PayloadHelper.cs | 4 +-
.../Analysis/Synonym/SynonymFilter.cs | 4 +-
.../Analysis/Synonym/SynonymMap.cs | 4 +-
.../Egothor.Stemmer/MultiTrie.cs | 8 +-
.../Egothor.Stemmer/Row.cs | 20 +-
.../Egothor.Stemmer/Trie.cs | 12 +-
.../Appending/AppendingTermsReader.cs | 2 +-
.../BlockTerms/BlockTermsReader.cs | 48 ++--
.../BlockTerms/BlockTermsWriter.cs | 38 ++--
.../BlockTerms/FixedGapTermsIndexReader.cs | 22 +-
.../BlockTerms/FixedGapTermsIndexWriter.cs | 18 +-
.../BlockTerms/VariableGapTermsIndexReader.cs | 14 +-
.../BlockTerms/VariableGapTermsIndexWriter.cs | 10 +-
.../Bloom/BloomFilteringPostingsFormat.cs | 8 +-
src/Lucene.Net.Codecs/Bloom/FuzzySet.cs | 16 +-
.../DiskDV/DiskDocValuesProducer.cs | 4 +-
.../IntBlock/FixedIntBlockIndexInput.cs | 10 +-
.../IntBlock/FixedIntBlockIndexOutput.cs | 12 +-
.../IntBlock/VariableIntBlockIndexInput.cs | 10 +-
.../IntBlock/VariableIntBlockIndexOutput.cs | 12 +-
.../Memory/DirectDocValuesConsumer.cs | 46 ++--
.../Memory/DirectDocValuesProducer.cs | 30 +--
.../Memory/FSTOrdTermsReader.cs | 36 +--
.../Memory/FSTOrdTermsWriter.cs | 44 ++--
src/Lucene.Net.Codecs/Memory/FSTTermOutputs.cs | 20 +-
src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs | 16 +-
src/Lucene.Net.Codecs/Memory/FSTTermsWriter.cs | 18 +-
.../Memory/MemoryDocValuesConsumer.cs | 68 +++---
.../Memory/MemoryDocValuesProducer.cs | 48 ++--
.../Memory/MemoryPostingsFormat.cs | 98 ++++-----
.../Pulsing/PulsingPostingsReader.cs | 44 ++--
.../Pulsing/PulsingPostingsWriter.cs | 40 ++--
src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs | 14 +-
src/Lucene.Net.Codecs/Sep/SepPostingsWriter.cs | 14 +-
src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs | 8 +-
src/Lucene.Net.Codecs/Sep/SepSkipListWriter.cs | 10 +-
.../SimpleText/SimpleTextFieldsReader.cs | 22 +-
.../SimpleText/SimpleTextLiveDocsFormat.cs | 2 +-
.../SimpleText/SimpleTextStoredFieldsReader.cs | 2 +-
.../SimpleText/SimpleTextTermVectorsReader.cs | 2 +-
.../Analysis/NumericTokenStream.cs | 29 ++-
.../Codecs/BlockTreeTermsReader.cs | 104 ++++-----
.../Codecs/BlockTreeTermsWriter.cs | 80 +++----
src/Lucene.Net.Core/Codecs/CodecUtil.cs | 22 +-
.../CompressingStoredFieldsIndexReader.cs | 16 +-
.../CompressingStoredFieldsIndexWriter.cs | 20 +-
.../CompressingStoredFieldsReader.cs | 58 ++---
.../CompressingStoredFieldsWriter.cs | 37 ++--
.../Compressing/CompressingTermVectorsReader.cs | 33 +--
.../Compressing/CompressingTermVectorsWriter.cs | 40 ++--
.../Codecs/Compressing/CompressionMode.cs | 6 +-
src/Lucene.Net.Core/Codecs/Compressing/LZ4.cs | 28 ++-
.../Codecs/Lucene3x/Lucene3xFieldInfosReader.cs | 4 +-
.../Lucene3x/Lucene3xSegmentInfoReader.cs | 20 +-
.../Codecs/Lucene3x/Lucene3xSkipListReader.cs | 10 +-
.../Lucene3x/Lucene3xStoredFieldsReader.cs | 26 +--
.../Lucene3x/Lucene3xTermVectorsReader.cs | 26 +--
.../Codecs/Lucene3x/SegmentTermDocs.cs | 10 +-
.../Codecs/Lucene3x/SegmentTermEnum.cs | 20 +-
.../Codecs/Lucene3x/SegmentTermPositions.cs | 4 +-
.../Codecs/Lucene3x/TermBuffer.cs | 6 +-
.../Codecs/Lucene3x/TermInfosReaderIndex.cs | 30 +--
.../Codecs/Lucene40/BitVector.cs | 32 +--
.../Codecs/Lucene40/Lucene40DocValuesReader.cs | 79 ++++---
.../Codecs/Lucene40/Lucene40FieldInfosReader.cs | 4 +-
.../Codecs/Lucene40/Lucene40PostingsReader.cs | 52 ++---
.../Lucene40/Lucene40SegmentInfoReader.cs | 2 +-
.../Lucene40/Lucene40SegmentInfoWriter.cs | 2 +-
.../Codecs/Lucene40/Lucene40SkipListReader.cs | 12 +-
.../Lucene40/Lucene40StoredFieldsReader.cs | 26 +--
.../Lucene40/Lucene40StoredFieldsWriter.cs | 18 +-
.../Lucene40/Lucene40TermVectorsReader.cs | 36 +--
.../Lucene40/Lucene40TermVectorsWriter.cs | 48 ++--
src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs | 14 +-
.../Codecs/Lucene41/Lucene41PostingsReader.cs | 58 ++---
.../Codecs/Lucene41/Lucene41PostingsWriter.cs | 32 +--
.../Codecs/Lucene41/Lucene41SkipReader.cs | 12 +-
.../Codecs/Lucene41/Lucene41SkipWriter.cs | 12 +-
.../Lucene42/Lucene42DocValuesProducer.cs | 62 +++---
.../Codecs/Lucene42/Lucene42FieldInfosReader.cs | 4 +-
.../Codecs/Lucene42/Lucene42NormsConsumer.cs | 28 +--
.../Lucene45/Lucene45DocValuesConsumer.cs | 96 ++++----
.../Lucene45/Lucene45DocValuesProducer.cs | 96 ++++----
.../Codecs/Lucene46/Lucene46FieldInfosReader.cs | 6 +-
.../Codecs/Lucene46/Lucene46FieldInfosWriter.cs | 6 +-
.../Lucene46/Lucene46SegmentInfoReader.cs | 2 +-
.../Lucene46/Lucene46SegmentInfoWriter.cs | 2 +-
.../Codecs/MultiLevelSkipListReader.cs | 6 +-
.../Codecs/MultiLevelSkipListWriter.cs | 4 +-
src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs | 8 +-
src/Lucene.Net.Core/Document/Field.cs | 6 +-
.../Document/FloatDocValuesField.cs | 4 +-
src/Lucene.Net.Core/Index/AutomatonTermsEnum.cs | 2 +-
src/Lucene.Net.Core/Index/CheckIndex.cs | 2 +-
src/Lucene.Net.Core/Index/DocTermOrds.cs | 18 +-
.../Index/DocumentsWriterPerThread.cs | 4 +-
.../Index/FreqProxTermsWriterPerField.cs | 30 +--
.../Index/PersistentSnapshotDeletionPolicy.cs | 12 +-
src/Lucene.Net.Core/Index/PrefixCodedTerms.cs | 10 +-
src/Lucene.Net.Core/Index/ReadersAndUpdates.cs | 7 +-
src/Lucene.Net.Core/Index/SegmentInfos.cs | 50 ++---
.../Index/TermVectorsConsumerPerField.cs | 10 +-
src/Lucene.Net.Core/Index/TermsHashPerField.cs | 21 +-
src/Lucene.Net.Core/Search/BooleanQuery.cs | 2 +-
.../Search/DisjunctionMaxQuery.cs | 4 +-
src/Lucene.Net.Core/Search/FieldCache.cs | 155 ++++++++-----
src/Lucene.Net.Core/Search/FieldCacheImpl.cs | 72 ++++--
.../Search/FieldCacheRangeFilter.cs | 69 +++---
src/Lucene.Net.Core/Search/FieldComparator.cs | 8 +-
src/Lucene.Net.Core/Search/FuzzyQuery.cs | 4 +-
src/Lucene.Net.Core/Search/MatchAllDocsQuery.cs | 2 +-
src/Lucene.Net.Core/Search/MultiPhraseQuery.cs | 2 +-
src/Lucene.Net.Core/Search/MultiTermQuery.cs | 4 +-
src/Lucene.Net.Core/Search/NGramPhraseQuery.cs | 2 +-
.../Search/NumericRangeFilter.cs | 42 ++--
src/Lucene.Net.Core/Search/NumericRangeQuery.cs | 50 +++--
src/Lucene.Net.Core/Search/PhraseQuery.cs | 2 +-
src/Lucene.Net.Core/Search/Query.cs | 4 +-
.../Search/Similarities/BM25Similarity.cs | 4 +-
.../Search/Similarities/DefaultSimilarity.cs | 4 +-
.../Search/Similarities/SimilarityBase.cs | 4 +-
.../Search/Spans/FieldMaskingSpanQuery.cs | 2 +-
.../Search/Spans/SpanFirstQuery.cs | 2 +-
.../Search/Spans/SpanNearPayloadCheckQuery.cs | 2 +-
.../Search/Spans/SpanNearQuery.cs | 2 +-
src/Lucene.Net.Core/Search/Spans/SpanOrQuery.cs | 2 +-
.../Search/Spans/SpanPayloadCheckQuery.cs | 2 +-
.../Search/Spans/SpanPositionRangeQuery.cs | 2 +-
src/Lucene.Net.Core/Search/TermQuery.cs | 2 +-
src/Lucene.Net.Core/Store/BufferedIndexInput.cs | 23 +-
src/Lucene.Net.Core/Store/ByteArrayDataInput.cs | 24 +-
.../Store/ByteBufferIndexInput.cs | 27 ++-
.../Store/CompoundFileDirectory.cs | 12 +-
src/Lucene.Net.Core/Store/CompoundFileWriter.cs | 6 +-
src/Lucene.Net.Core/Store/DataInput.cs | 42 ++--
src/Lucene.Net.Core/Store/DataOutput.cs | 46 ++--
src/Lucene.Net.Core/Support/ByteBuffer.cs | 218 +++++++++++++++----
src/Lucene.Net.Core/Support/DataInputStream.cs | 33 ++-
src/Lucene.Net.Core/Support/DataOutputStream.cs | 24 +-
src/Lucene.Net.Core/Support/IDataInput.cs | 26 ++-
src/Lucene.Net.Core/Support/IDataOutput.cs | 24 +-
src/Lucene.Net.Core/Support/LongBuffer.cs | 2 +-
.../Support/MemoryMappedFileByteBuffer.cs | 86 ++++++--
src/Lucene.Net.Core/Support/Number.cs | 34 ++-
src/Lucene.Net.Core/Util/ArrayUtil.cs | 24 +-
.../Util/Automaton/BasicOperations.cs | 2 +-
.../Util/Automaton/SortedIntSet.cs | 6 +-
.../Util/Automaton/SpecialOperations.cs | 2 +-
src/Lucene.Net.Core/Util/Fst/Builder.cs | 18 +-
.../Util/Fst/ByteSequenceOutputs.cs | 4 +-
src/Lucene.Net.Core/Util/Fst/BytesStore.cs | 6 +-
.../Util/Fst/CharSequenceOutputs.cs | 8 +-
src/Lucene.Net.Core/Util/Fst/FST.cs | 80 +++----
.../Util/Fst/IntSequenceOutputs.cs | 18 +-
src/Lucene.Net.Core/Util/Fst/IntsRefFSTEnum.cs | 8 +-
.../Util/Fst/PositiveIntOutputs.cs | 4 +-
src/Lucene.Net.Core/Util/Fst/Util.cs | 36 +--
src/Lucene.Net.Core/Util/IntBlockPool.cs | 84 ++++---
src/Lucene.Net.Core/Util/IntsRef.cs | 29 ++-
src/Lucene.Net.Core/Util/LongsRef.cs | 21 +-
.../Util/Mutable/MutableValueFloat.cs | 2 +-
src/Lucene.Net.Core/Util/NumericUtils.cs | 134 ++++++++----
src/Lucene.Net.Core/Util/OfflineSorter.cs | 6 +-
.../Util/Packed/AbstractBlockPackedWriter.cs | 7 +-
.../Util/Packed/BlockPackedReader.cs | 2 +-
.../Util/Packed/BlockPackedReaderIterator.cs | 11 +-
.../Util/Packed/BlockPackedWriter.cs | 2 +-
.../Util/Packed/BulkOperation.cs | 15 +-
.../Util/Packed/BulkOperationPacked.cs | 10 +-
.../Packed/BulkOperationPackedSingleBlock.cs | 23 +-
src/Lucene.Net.Core/Util/Packed/Direct16.cs | 2 +-
src/Lucene.Net.Core/Util/Packed/Direct32.cs | 2 +-
src/Lucene.Net.Core/Util/Packed/Direct64.cs | 2 +-
.../Packed/DirectPacked64SingleBlockReader.cs | 2 +-
.../Util/Packed/DirectPackedReader.cs | 16 +-
.../Util/Packed/EliasFanoDecoder.cs | 20 +-
.../Util/Packed/EliasFanoEncoder.cs | 17 +-
.../Util/Packed/MonotonicBlockPackedReader.cs | 6 +-
.../Util/Packed/MonotonicBlockPackedWriter.cs | 8 +-
.../Util/Packed/Packed16ThreeBlocks.cs | 2 +-
src/Lucene.Net.Core/Util/Packed/Packed64.cs | 26 +--
.../Util/Packed/Packed64SingleBlock.cs | 10 +-
.../Util/Packed/PackedDataInput.cs | 4 +-
.../Util/Packed/PackedDataOutput.cs | 4 +-
src/Lucene.Net.Core/Util/Packed/PackedInts.cs | 60 +++--
.../Util/Packed/PackedReaderIterator.cs | 10 +-
.../Util/RecyclingIntBlockAllocator.cs | 10 +-
src/Lucene.Net.Core/Util/SmallFloat.cs | 35 ++-
src/Lucene.Net.Core/Util/ToStringUtils.cs | 5 +-
src/Lucene.Net.Core/Util/UnicodeUtil.cs | 6 +-
src/Lucene.Net.Core/Util/WAH8DocIdSet.cs | 8 +-
src/Lucene.Net.Facet/FacetsConfig.cs | 12 +-
src/Lucene.Net.Facet/Range/DoubleRange.cs | 2 +-
.../Range/DoubleRangeFacetCounts.cs | 4 +-
.../Taxonomy/CachedOrdinalsReader.cs | 4 +-
.../Directory/DirectoryTaxonomyWriter.cs | 12 +-
.../Taxonomy/DocValuesOrdinalsReader.cs | 8 +-
.../Taxonomy/FloatAssociationFacetField.cs | 4 +-
.../Taxonomy/TaxonomyFacetCounts.cs | 2 +-
.../TaxonomyFacetSumFloatAssociations.cs | 2 +-
.../Taxonomy/TaxonomyFacetSumValueSource.cs | 2 +-
.../VectorHighlight/FieldPhraseList.cs | 2 +-
.../MemoryIndex.MemoryIndexReader.cs | 8 +-
src/Lucene.Net.Memory/MemoryIndex.cs | 10 +-
.../Index/Sorter/SortingAtomicReader.cs | 20 +-
src/Lucene.Net.Misc/Util/Fst/ListOfOutputs.cs | 6 +-
.../Util/Fst/UpToTwoPositiveIntOutputs.cs | 10 +-
src/Lucene.Net.Queries/BoostingQuery.cs | 4 +-
src/Lucene.Net.Queries/CommonTermsQuery.cs | 16 +-
src/Lucene.Net.Queries/CustomScoreQuery.cs | 2 +-
src/Lucene.Net.Queries/Function/BoostedQuery.cs | 2 +-
.../Function/FunctionQuery.cs | 2 +-
.../Function/ValueSources/ByteFieldSource.cs | 2 +-
.../Function/ValueSources/ConstValueSource.cs | 2 +-
.../ValueSources/DoubleConstValueSource.cs | 2 +-
.../Function/ValueSources/EnumFieldSource.cs | 4 +-
.../Function/ValueSources/FloatFieldSource.cs | 2 +-
.../Function/ValueSources/IntFieldSource.cs | 4 +-
.../ValueSources/LinearFloatFunction.cs | 4 +-
.../Function/ValueSources/LongFieldSource.cs | 4 +-
.../ValueSources/RangeMapFloatFunction.cs | 4 +-
.../ValueSources/ReciprocalFloatFunction.cs | 4 +-
.../Function/ValueSources/ScaleFloatFunction.cs | 6 +-
.../Function/ValueSources/ShortFieldSource.cs | 2 +-
src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs | 4 +-
.../Classic/QueryParserBase.cs | 2 +-
.../Standard/Builders/FuzzyQueryNodeBuilder.cs | 2 +-
.../Builders/NumericRangeQueryNodeBuilder.cs | 6 +-
.../Xml/Builders/NumericRangeFilterBuilder.cs | 6 +-
.../Xml/Builders/NumericRangeQueryBuilder.cs | 6 +-
.../Queries/FuzzyLikeThisQuery.cs | 6 +-
.../Queries/SlowFuzzyQuery.cs | 6 +-
.../Queries/SlowFuzzyTermsEnum.cs | 2 +-
.../Util/DistanceToShapeValueSource.cs | 2 +-
.../Spell/JaroWinklerDistance.cs | 4 +-
.../Spell/LuceneLevenshteinDistance.cs | 8 +-
.../Suggest/Analyzing/AnalyzingSuggester.cs | 34 +--
.../Suggest/Analyzing/FSTUtil.cs | 8 +-
.../Suggest/Analyzing/FreeTextSuggester.cs | 20 +-
.../Suggest/Analyzing/FuzzySuggester.cs | 6 +-
.../Suggest/Fst/FSTCompletionBuilder.cs | 2 +-
.../Suggest/Fst/FSTCompletionLookup.cs | 8 +-
.../Suggest/Fst/WFSTCompletionLookup.cs | 10 +-
.../Suggest/Jaspell/JaspellLookup.cs | 8 +-
.../Suggest/SortedInputIterator.cs | 16 +-
.../Suggest/SortedTermFreqIteratorWrapper.cs | 4 +-
src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs | 8 +-
.../MockFixedIntBlockPostingsFormat.cs | 4 +-
.../MockVariableIntBlockPostingsFormat.cs | 10 +-
.../Codecs/MockSep/MockSingleIntIndexInput.cs | 6 +-
.../Codecs/MockSep/MockSingleIntIndexOutput.cs | 6 +-
.../lucene3x/PreFlexRWFieldInfosReader.cs | 6 +-
.../lucene3x/PreFlexRWFieldInfosWriter.cs | 6 +-
.../Codecs/lucene3x/PreFlexRWFieldsWriter.cs | 16 +-
.../Codecs/lucene3x/PreFlexRWSkipListWriter.cs | 12 +-
.../lucene3x/PreFlexRWStoredFieldsWriter.cs | 20 +-
.../lucene3x/PreFlexRWTermVectorsWriter.cs | 36 +--
.../Codecs/lucene3x/TermInfosWriter.cs | 28 +--
.../Codecs/lucene40/Lucene40DocValuesWriter.cs | 32 +--
.../Codecs/lucene40/Lucene40FieldInfosWriter.cs | 4 +-
.../Codecs/lucene40/Lucene40PostingsWriter.cs | 34 +--
.../Codecs/lucene40/Lucene40SkipListWriter.cs | 14 +-
.../lucene42/Lucene42DocValuesConsumer.cs | 52 ++---
.../Codecs/lucene42/Lucene42FieldInfosWriter.cs | 4 +-
.../Codecs/ramonly/RAMOnlyPostingsFormat.cs | 4 +-
.../Index/BaseDocValuesFormatTestCase.cs | 2 +-
.../Index/BaseStoredFieldsFormatTestCase.cs | 4 +-
.../Store/MockIndexInputWrapper.cs | 35 ++-
.../Util/automaton/AutomatonTestUtil.cs | 2 +-
.../Util/fst/FSTTester.cs | 24 +-
.../Analysis/Core/TestTypeTokenFilterFactory.cs | 4 +-
.../Analysis/Hunspell/TestDictionary.cs | 10 +-
.../Range/TestRangeFacetCounts.cs | 18 +-
.../AllGroupHeadsCollectorTest.cs | 2 +-
src/Lucene.Net.Tests.Grouping/TestGrouping.cs | 4 +-
.../Highlight/HighlighterTest.cs | 2 +-
src/Lucene.Net.Tests.Join/TestBlockJoin.cs | 16 +-
.../Index/Sorter/SorterTestBase.cs | 4 +-
.../Util/Fst/TestFSTsMisc.cs | 16 +-
.../TestCustomScoreQuery.cs | 2 +-
.../Suggest/Analyzing/FuzzySuggesterTest.cs | 8 +-
.../core/Analysis/TestNumericTokenStream.cs | 8 +-
src/Lucene.Net.Tests/core/Document/TestField.cs | 2 +-
.../core/Index/Test2BBinaryDocValues.cs | 4 +-
.../core/Index/TestAllFilesHaveCodecHeader.cs | 2 +-
.../core/Index/TestBackwardsCompatibility.cs | 14 +-
.../core/Index/TestBackwardsCompatibility3x.cs | 14 +-
.../core/Index/TestByteSlices.cs | 8 +-
.../core/Index/TestCompoundFile.cs | 18 +-
.../core/Index/TestCustomNorms.cs | 4 +-
.../core/Index/TestDirectoryReader.cs | 4 +-
.../core/Index/TestDocTermOrds.cs | 2 +-
.../core/Index/TestDocValuesIndexing.cs | 4 +-
.../core/Index/TestDocValuesWithThreads.cs | 10 +-
.../core/Index/TestIndexInput.cs | 40 ++--
.../core/Index/TestIntBlockPool.cs | 12 +-
.../core/Index/TestPerSegmentDeletes.cs | 2 +-
.../core/Index/TestPostingsOffsets.cs | 2 +-
.../core/Index/TestTermsEnum.cs | 2 +-
.../core/Search/JustCompileSearch.cs | 5 +-
.../core/Search/TestCachingWrapperFilter.cs | 4 +-
.../core/Search/TestDocValuesScoring.cs | 2 +-
.../core/Search/TestFieldCache.cs | 60 ++---
.../core/Search/TestFieldCacheRangeFilter.cs | 156 ++++++-------
.../Search/TestMultiValuedNumericRangeQuery.cs | 2 +-
.../core/Search/TestNumericRangeQuery32.cs | 100 ++++-----
.../core/Search/TestNumericRangeQuery64.cs | 86 ++++----
.../core/Search/TestQueryRescorer.cs | 2 +-
src/Lucene.Net.Tests/core/Search/TestSort.cs | 20 +-
.../core/Search/TestSortRandom.cs | 2 +-
.../core/Store/TestFileSwitchDirectory.cs | 2 +-
.../core/Store/TestMultiMMap.cs | 38 ++--
.../core/Store/TestNRTCachingDirectory.cs | 2 +-
.../core/Support/TestByteBuffer.cs | 54 ++---
.../core/Support/TestLongBuffer.cs | 8 +-
.../Util/Automaton/TestSpecialOperations.cs | 4 +-
.../core/Util/Fst/TestBytesStore.cs | 4 +-
src/Lucene.Net.Tests/core/Util/Fst/TestFSTs.cs | 74 +++----
.../core/Util/Packed/TestPackedInts.cs | 28 +--
src/Lucene.Net.Tests/core/Util/TestArrayUtil.cs | 18 +-
src/Lucene.Net.Tests/core/Util/TestBroadWord.cs | 6 +-
.../core/Util/TestFieldCacheSanityChecker.cs | 6 +-
src/Lucene.Net.Tests/core/Util/TestIntsRef.cs | 4 +-
.../core/Util/TestNumericUtils.cs | 50 ++---
.../core/Util/TestRecyclingIntBlockAllocator.cs | 16 +-
.../core/Util/TestSmallFloat.cs | 40 ++--
.../core/Util/TestUnicodeUtil.cs | 4 +-
330 files changed, 3393 insertions(+), 2713 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
index a5276f7..0fa0f34 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
@@ -384,7 +384,7 @@ namespace Lucene.Net.Analysis.Hunspell
IntsRef output = new IntsRef(entries.Count);
foreach (char? c in entries)
{
- output.Ints[output.Length++] = c.HasValue ? c.Value : 0;
+ output.Int32s[output.Length++] = c.HasValue ? c.Value : 0;
}
builder.Add(scratch, output);
}
@@ -521,12 +521,12 @@ namespace Lucene.Net.Analysis.Hunspell
throw new System.NotSupportedException("Too many unique append flags, please report this to dev@lucene.apache.org");
}
- affixWriter.WriteShort((short)flag);
- affixWriter.WriteShort((short)stripOrd);
+ affixWriter.WriteInt16((short)flag);
+ affixWriter.WriteInt16((short)stripOrd);
// encode crossProduct into patternIndex
int patternOrd = (int)patternIndex << 1 | (crossProduct ? 1 : 0);
- affixWriter.WriteShort((short)patternOrd);
- affixWriter.WriteShort((short)appendFlagsOrd);
+ affixWriter.WriteInt16((short)patternOrd);
+ affixWriter.WriteInt16((short)appendFlagsOrd);
if (needsInputCleaning)
{
@@ -875,7 +875,7 @@ namespace Lucene.Net.Analysis.Hunspell
currentOrds = new IntsRef(); // must be this way
}
currentOrds.Grow(currentOrds.Length + 1);
- currentOrds.Ints[currentOrds.Length++] = ord;
+ currentOrds.Int32s[currentOrds.Length++] = ord;
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
index 3b2d0d4..2c0d0d7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
@@ -187,18 +187,18 @@ namespace Lucene.Net.Analysis.Hunspell
for (int j = 0; j < prefixes.Length; j++)
{
- int prefix = prefixes.Ints[prefixes.Offset + j];
+ int prefix = prefixes.Int32s[prefixes.Offset + j];
if (prefix == previous)
{
continue;
}
affixReader.Position = 8 * prefix;
- char flag = (char)(affixReader.ReadShort() & 0xffff);
- char stripOrd = (char)(affixReader.ReadShort() & 0xffff);
- int condition = (char)(affixReader.ReadShort() & 0xffff);
+ char flag = (char)(affixReader.ReadInt16() & 0xffff);
+ char stripOrd = (char)(affixReader.ReadInt16() & 0xffff);
+ int condition = (char)(affixReader.ReadInt16() & 0xffff);
bool crossProduct = (condition & 1) == 1;
condition = (int)((uint)condition >> 1);
- char append = (char)(affixReader.ReadShort() & 0xffff);
+ char append = (char)(affixReader.ReadInt16() & 0xffff);
bool compatible;
if (recursionDepth == 0)
@@ -256,18 +256,18 @@ namespace Lucene.Net.Analysis.Hunspell
for (int j = 0; j < suffixes.Length; j++)
{
- int suffix = suffixes.Ints[suffixes.Offset + j];
+ int suffix = suffixes.Int32s[suffixes.Offset + j];
if (suffix == previous)
{
continue;
}
affixReader.Position = 8 * suffix;
- char flag = (char)(affixReader.ReadShort() & 0xffff);
- char stripOrd = (char)(affixReader.ReadShort() & 0xffff);
- int condition = (char)(affixReader.ReadShort() & 0xffff);
+ char flag = (char)(affixReader.ReadInt16() & 0xffff);
+ char stripOrd = (char)(affixReader.ReadInt16() & 0xffff);
+ int condition = (char)(affixReader.ReadInt16() & 0xffff);
bool crossProduct = (condition & 1) == 1;
condition = (int)((uint)condition >> 1);
- char append = (char)(affixReader.ReadShort() & 0xffff);
+ char append = (char)(affixReader.ReadInt16() & 0xffff);
bool compatible;
if (recursionDepth == 0)
@@ -364,12 +364,12 @@ namespace Lucene.Net.Analysis.Hunspell
{
// TODO: just pass this in from before, no need to decode it twice
affixReader.Position = 8 * affix;
- char flag = (char)(affixReader.ReadShort() & 0xffff);
+ char flag = (char)(affixReader.ReadInt16() & 0xffff);
affixReader.SkipBytes(2); // strip
- int condition = (char)(affixReader.ReadShort() & 0xffff);
+ int condition = (char)(affixReader.ReadInt16() & 0xffff);
bool crossProduct = (condition & 1) == 1;
condition = (int)((uint)condition >> 1);
- char append = (char)(affixReader.ReadShort() & 0xffff);
+ char append = (char)(affixReader.ReadInt16() & 0xffff);
List<CharsRef> stems = new List<CharsRef>();
@@ -378,7 +378,7 @@ namespace Lucene.Net.Analysis.Hunspell
{
for (int i = 0; i < forms.Length; i++)
{
- dictionary.flagLookup.Get(forms.Ints[forms.Offset + i], scratch);
+ dictionary.flagLookup.Get(forms.Int32s[forms.Offset + i], scratch);
char[] wordFlags = Dictionary.DecodeFlags(scratch);
if (Dictionary.HasFlag(wordFlags, flag))
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Payloads/IntegerEncoder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/IntegerEncoder.cs b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/IntegerEncoder.cs
index bb264a3..0a1b731 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/IntegerEncoder.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/IntegerEncoder.cs
@@ -29,7 +29,7 @@ namespace Lucene.Net.Analysis.Payloads
{
public override BytesRef Encode(char[] buffer, int offset, int length)
{
- int payload = ArrayUtil.ParseInt(buffer, offset, length); //TODO: improve this so that we don't have to new Strings
+ int payload = ArrayUtil.ParseInt32(buffer, offset, length); //TODO: improve this so that we don't have to new Strings
byte[] bytes = PayloadHelper.EncodeInt(payload);
BytesRef result = new BytesRef(bytes);
return result;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Payloads/PayloadHelper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/PayloadHelper.cs b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/PayloadHelper.cs
index 1045489..e0dca16 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/PayloadHelper.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/PayloadHelper.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.Payloads
public static byte[] EncodeFloat(float payload, byte[] data, int offset)
{
- return EncodeInt(Number.FloatToIntBits(payload), data, offset);
+ return EncodeInt(Number.SingleToInt32Bits(payload), data, offset);
}
public static byte[] EncodeInt(int payload)
@@ -67,7 +67,7 @@ namespace Lucene.Net.Analysis.Payloads
public static float DecodeFloat(byte[] bytes, int offset)
{
- return Number.IntBitsToFloat(DecodeInt(bytes, offset));
+ return Number.Int32BitsToSingle(DecodeInt(bytes, offset));
}
public static int DecodeInt(byte[] bytes, int offset)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
index 52bb61d..647d8ff 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs
@@ -501,13 +501,13 @@ namespace Lucene.Net.Analysis.Synonym
{
bytesReader.Reset(bytes.Bytes, bytes.Offset, bytes.Length);
- int code = bytesReader.ReadVInt();
+ int code = bytesReader.ReadVInt32();
bool keepOrig = (code & 0x1) == 0;
int count = (int)((uint)code >> 1);
//System.out.println(" addOutput count=" + count + " keepOrig=" + keepOrig);
for (int outputIDX = 0; outputIDX < count; outputIDX++)
{
- synonyms.Words.Get(bytesReader.ReadVInt(), scratchBytes);
+ synonyms.Words.Get(bytesReader.ReadVInt32(), scratchBytes);
//System.out.println(" outIDX=" + outputIDX + " bytes=" + scratchBytes.length);
UnicodeUtil.UTF8toUTF16(scratchBytes, scratchChars);
int lastStart = scratchChars.Offset;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs
index 1c37c85..ac487cd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs
@@ -303,12 +303,12 @@ namespace Lucene.Net.Analysis.Synonym
}
dedupSet.Add(ent);
}
- scratchOutput.WriteVInt(output.ords[i]);
+ scratchOutput.WriteVInt32(output.ords[i]);
count++;
}
int pos = scratchOutput.Position;
- scratchOutput.WriteVInt(count << 1 | (output.includeOrig ? 0 : 1));
+ scratchOutput.WriteVInt32(count << 1 | (output.includeOrig ? 0 : 1));
int pos2 = scratchOutput.Position;
int vIntLen = pos2 - pos;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
index d8a3282..373bac5 100644
--- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/MultiTrie.cs
@@ -83,8 +83,8 @@ namespace Egothor.Stemmer
: base(false)
{
forward = @is.ReadBoolean();
- BY = @is.ReadInt();
- for (int i = @is.ReadInt(); i > 0; i--)
+ BY = @is.ReadInt32();
+ for (int i = @is.ReadInt32(); i > 0; i--)
{
m_tries.Add(new Trie(@is));
}
@@ -148,8 +148,8 @@ namespace Egothor.Stemmer
public override void Store(IDataOutput os)
{
os.WriteBoolean(forward);
- os.WriteInt(BY);
- os.WriteInt(m_tries.Count);
+ os.WriteInt32(BY);
+ os.WriteInt32(m_tries.Count);
foreach (Trie trie in m_tries)
trie.Store(os);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
index b2ee5fa..a11dc52 100644
--- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Row.cs
@@ -77,14 +77,14 @@ namespace Egothor.Stemmer
/// <exception cref="IOException">if an I/O error occurs</exception>
public Row(IDataInput @is)
{
- for (int i = @is.ReadInt(); i > 0; i--)
+ for (int i = @is.ReadInt32(); i > 0; i--)
{
char ch = @is.ReadChar();
Cell c = new Cell();
- c.cmd = @is.ReadInt();
- c.cnt = @is.ReadInt();
- c.@ref = @is.ReadInt();
- c.skip = @is.ReadInt();
+ c.cmd = @is.ReadInt32();
+ c.cnt = @is.ReadInt32();
+ c.@ref = @is.ReadInt32();
+ c.skip = @is.ReadInt32();
cells[ch] = c;
}
}
@@ -247,7 +247,7 @@ namespace Egothor.Stemmer
/// <exception cref="IOException">if an I/O error occurs</exception>
public virtual void Store(IDataOutput os)
{
- os.WriteInt(cells.Count);
+ os.WriteInt32(cells.Count);
IEnumerator<char> i = cells.Keys.GetEnumerator();
for (; i.MoveNext();)
{
@@ -259,10 +259,10 @@ namespace Egothor.Stemmer
}
os.WriteChar(c);
- os.WriteInt(e.cmd);
- os.WriteInt(e.cnt);
- os.WriteInt(e.@ref);
- os.WriteInt(e.skip);
+ os.WriteInt32(e.cmd);
+ os.WriteInt32(e.cnt);
+ os.WriteInt32(e.@ref);
+ os.WriteInt32(e.skip);
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
index 905f213..da9818f 100644
--- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
+++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Trie.cs
@@ -84,12 +84,12 @@ namespace Egothor.Stemmer
public Trie(IDataInput @is)
{
forward = @is.ReadBoolean();
- root = @is.ReadInt();
- for (int i = @is.ReadInt(); i > 0; i--)
+ root = @is.ReadInt32();
+ for (int i = @is.ReadInt32(); i > 0; i--)
{
cmds.Add(@is.ReadUTF());
}
- for (int i = @is.ReadInt(); i > 0; i--)
+ for (int i = @is.ReadInt32(); i > 0; i--)
{
rows.Add(new Row(@is));
}
@@ -346,12 +346,12 @@ namespace Egothor.Stemmer
public virtual void Store(IDataOutput os)
{
os.WriteBoolean(forward);
- os.WriteInt(root);
- os.WriteInt(cmds.Count);
+ os.WriteInt32(root);
+ os.WriteInt32(cmds.Count);
foreach (string cmd in cmds)
os.WriteUTF(cmd);
- os.WriteInt(rows.Count);
+ os.WriteInt32(rows.Count);
foreach (Row row in rows)
row.Store(os);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
index 1b01fea..ae95ef3 100644
--- a/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Appending/AppendingTermsReader.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Codecs.Appending
protected override void SeekDir(IndexInput input, long dirOffset)
{
input.Seek(input.Length - sizeof(long)/8);
- long offset = input.ReadLong();
+ long offset = input.ReadInt64();
input.Seek(offset);
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
index 8a0bf2b..707bef3 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsReader.cs
@@ -116,7 +116,7 @@ namespace Lucene.Net.Codecs.BlockTerms
// Read per-field details
SeekDir(_input, _dirOffset);
- int numFields = _input.ReadVInt();
+ int numFields = _input.ReadVInt32();
if (numFields < 0)
{
throw new CorruptIndexException(string.Format("Invalid number of fields: {0}, Resource: {1}",
@@ -125,19 +125,19 @@ namespace Lucene.Net.Codecs.BlockTerms
for (var i = 0; i < numFields; i++)
{
- var field = _input.ReadVInt();
- var numTerms = _input.ReadVLong();
+ var field = _input.ReadVInt32();
+ var numTerms = _input.ReadVInt64();
Debug.Assert(numTerms >= 0);
- var termsStartPointer = _input.ReadVLong();
+ var termsStartPointer = _input.ReadVInt64();
var fieldInfo = fieldInfos.FieldInfo(field);
var sumTotalTermFreq = fieldInfo.IndexOptions == IndexOptions.DOCS_ONLY
? -1
- : _input.ReadVLong();
- var sumDocFreq = _input.ReadVLong();
- var docCount = _input.ReadVInt();
- var longsSize = _version >= BlockTermsWriter.VERSION_META_ARRAY ? _input.ReadVInt() : 0;
+ : _input.ReadVInt64();
+ var sumDocFreq = _input.ReadVInt64();
+ var docCount = _input.ReadVInt32();
+ var longsSize = _version >= BlockTermsWriter.VERSION_META_ARRAY ? _input.ReadVInt32() : 0;
if (docCount < 0 || docCount > info.DocCount)
{
@@ -197,7 +197,7 @@ namespace Lucene.Net.Codecs.BlockTerms
BlockTermsWriter.VERSION_CURRENT);
if (version < BlockTermsWriter.VERSION_APPEND_ONLY)
- _dirOffset = input.ReadLong();
+ _dirOffset = input.ReadInt64();
return version;
}
@@ -207,12 +207,12 @@ namespace Lucene.Net.Codecs.BlockTerms
if (_version >= BlockTermsWriter.VERSION_CHECKSUM)
{
input.Seek(input.Length - CodecUtil.FooterLength() - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
else if (_version >= BlockTermsWriter.VERSION_APPEND_ONLY)
{
input.Seek(input.Length - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
input.Seek(dirOffset);
}
@@ -531,9 +531,9 @@ namespace Lucene.Net.Codecs.BlockTerms
{
_state.TermBlockOrd++;
_state.Ord++;
- _termSuffixesReader.SkipBytes(_termSuffixesReader.ReadVInt());
+ _termSuffixesReader.SkipBytes(_termSuffixesReader.ReadVInt32());
}
- var suffix = _termSuffixesReader.ReadVInt();
+ var suffix = _termSuffixesReader.ReadVInt32();
_term.Length = _termBlockPrefix + suffix;
if (_term.Bytes.Length < _term.Length)
{
@@ -558,7 +558,7 @@ namespace Lucene.Net.Codecs.BlockTerms
// block and return NOT_FOUND:
Debug.Assert(_state.TermBlockOrd == 0);
- var suffix = _termSuffixesReader.ReadVInt();
+ var suffix = _termSuffixesReader.ReadVInt32();
_term.Length = _termBlockPrefix + suffix;
if (_term.Bytes.Length < _term.Length)
{
@@ -581,7 +581,7 @@ namespace Lucene.Net.Codecs.BlockTerms
_state.TermBlockOrd++;
_state.Ord++;
- var suffix = _termSuffixesReader.ReadVInt();
+ var suffix = _termSuffixesReader.ReadVInt32();
// We know the prefix matches, so just compare the new suffix:
@@ -710,7 +710,7 @@ namespace Lucene.Net.Codecs.BlockTerms
// TODO: cutover to something better for these ints! simple64?
- var suffix = _termSuffixesReader.ReadVInt();
+ var suffix = _termSuffixesReader.ReadVInt32();
//System.out.println(" suffix=" + suffix);
_term.Length = _termBlockPrefix + suffix;
@@ -852,15 +852,15 @@ namespace Lucene.Net.Codecs.BlockTerms
// bsearch w/in the block...
_state.BlockFilePointer = _input.FilePointer;
- _blockTermCount = _input.ReadVInt();
+ _blockTermCount = _input.ReadVInt32();
if (_blockTermCount == 0)
return false;
- _termBlockPrefix = _input.ReadVInt();
+ _termBlockPrefix = _input.ReadVInt32();
// term suffixes:
- int len = _input.ReadVInt();
+ int len = _input.ReadVInt32();
if (_termSuffixes.Length < len)
{
_termSuffixes = new byte[ArrayUtil.Oversize(len, 1)];
@@ -871,7 +871,7 @@ namespace Lucene.Net.Codecs.BlockTerms
_termSuffixesReader.Reset(_termSuffixes, 0, len);
// docFreq, totalTermFreq
- len = _input.ReadVInt();
+ len = _input.ReadVInt32();
if (_docFreqBytes.Length < len)
_docFreqBytes = new byte[ArrayUtil.Oversize(len, 1)];
@@ -879,7 +879,7 @@ namespace Lucene.Net.Codecs.BlockTerms
_freqReader.Reset(_docFreqBytes, 0, len);
// metadata
- len = _input.ReadVInt();
+ len = _input.ReadVInt32();
if (_bytes == null)
{
_bytes = new byte[ArrayUtil.Oversize(len, 1)];
@@ -929,15 +929,15 @@ namespace Lucene.Net.Codecs.BlockTerms
// TODO: if docFreq were bulk decoded we could
// just skipN here:
- _state.DocFreq = _freqReader.ReadVInt();
+ _state.DocFreq = _freqReader.ReadVInt32();
if (_fieldReader._fieldInfo.IndexOptions != IndexOptions.DOCS_ONLY)
{
- _state.TotalTermFreq = _state.DocFreq + _freqReader.ReadVLong();
+ _state.TotalTermFreq = _state.DocFreq + _freqReader.ReadVInt64();
}
// metadata
for (int i = 0; i < _longs.Length; i++)
{
- _longs[i] = _bytesReader.ReadVLong();
+ _longs[i] = _bytesReader.ReadVInt64();
}
_blockTermsReader._postingsReader.DecodeTerm(_longs, _bytesReader, _fieldReader._fieldInfo, _state, absolute);
_metaDataUpto++;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
index d95aa57..fd70f40 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/BlockTermsWriter.cs
@@ -131,22 +131,22 @@ namespace Lucene.Net.Codecs.BlockTerms
{
var dirStart = m_output.FilePointer;
- m_output.WriteVInt(_fields.Count);
+ m_output.WriteVInt32(_fields.Count);
foreach (var field in _fields)
{
- m_output.WriteVInt(field.FieldInfo.Number);
- m_output.WriteVLong(field.NumTerms);
- m_output.WriteVLong(field.TermsStartPointer);
+ m_output.WriteVInt32(field.FieldInfo.Number);
+ m_output.WriteVInt64(field.NumTerms);
+ m_output.WriteVInt64(field.TermsStartPointer);
if (field.FieldInfo.IndexOptions != IndexOptions.DOCS_ONLY)
{
- m_output.WriteVLong(field.SumTotalTermFreq);
+ m_output.WriteVInt64(field.SumTotalTermFreq);
}
- m_output.WriteVLong(field.SumDocFreq);
- m_output.WriteVInt(field.DocCount);
+ m_output.WriteVInt64(field.SumDocFreq);
+ m_output.WriteVInt32(field.DocCount);
if (VERSION_CURRENT >= VERSION_META_ARRAY)
{
- m_output.WriteVInt(field.LongsSize);
+ m_output.WriteVInt32(field.LongsSize);
}
}
@@ -162,7 +162,7 @@ namespace Lucene.Net.Codecs.BlockTerms
private void WriteTrailer(long dirStart)
{
- m_output.WriteLong(dirStart);
+ m_output.WriteInt64(dirStart);
}
private class TermEntry
@@ -276,7 +276,7 @@ namespace Lucene.Net.Codecs.BlockTerms
}
// EOF marker:
- outerInstance.m_output.WriteVInt(0);
+ outerInstance.m_output.WriteVInt32(0);
_sumTotalTermFreq = sumTotalTermFreq;
_sumDocFreq = sumDocFreq;
@@ -334,8 +334,8 @@ namespace Lucene.Net.Codecs.BlockTerms
_pendingTerms[termCount].Term));
}
- outerInstance.m_output.WriteVInt(_pendingCount);
- outerInstance.m_output.WriteVInt(commonPrefix);
+ outerInstance.m_output.WriteVInt32(_pendingCount);
+ outerInstance.m_output.WriteVInt32(commonPrefix);
// 2nd pass: write suffixes, as separate byte[] blob
for (var termCount = 0; termCount < _pendingCount; termCount++)
@@ -343,10 +343,10 @@ namespace Lucene.Net.Codecs.BlockTerms
var suffix = _pendingTerms[termCount].Term.Length - commonPrefix;
// TODO: cutover to better intblock codec, instead
// of interleaving here:
- _bytesWriter.WriteVInt(suffix);
+ _bytesWriter.WriteVInt32(suffix);
_bytesWriter.WriteBytes(_pendingTerms[termCount].Term.Bytes, commonPrefix, suffix);
}
- outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+ outerInstance.m_output.WriteVInt32((int)_bytesWriter.FilePointer);
_bytesWriter.WriteTo(outerInstance.m_output);
_bytesWriter.Reset();
@@ -359,13 +359,13 @@ namespace Lucene.Net.Codecs.BlockTerms
Debug.Assert(state != null);
- _bytesWriter.WriteVInt(state.DocFreq);
+ _bytesWriter.WriteVInt32(state.DocFreq);
if (_fieldInfo.IndexOptions != IndexOptions.DOCS_ONLY)
{
- _bytesWriter.WriteVLong(state.TotalTermFreq - state.DocFreq);
+ _bytesWriter.WriteVInt64(state.TotalTermFreq - state.DocFreq);
}
}
- outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+ outerInstance.m_output.WriteVInt32((int)_bytesWriter.FilePointer);
_bytesWriter.WriteTo(outerInstance.m_output);
_bytesWriter.Reset();
@@ -378,13 +378,13 @@ namespace Lucene.Net.Codecs.BlockTerms
_postingsWriter.EncodeTerm(longs, _bufferWriter, _fieldInfo, state, absolute);
for (int i = 0; i < _longsSize; i++)
{
- _bytesWriter.WriteVLong(longs[i]);
+ _bytesWriter.WriteVInt64(longs[i]);
}
_bufferWriter.WriteTo(_bytesWriter);
_bufferWriter.Reset();
absolute = false;
}
- outerInstance.m_output.WriteVInt((int)_bytesWriter.FilePointer);
+ outerInstance.m_output.WriteVInt32((int)_bytesWriter.FilePointer);
_bytesWriter.WriteTo(outerInstance.m_output);
_bytesWriter.Reset();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 534c9d0..4fdb5fe 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs.BlockTerms
if (_version >= FixedGapTermsIndexWriter.VERSION_CHECKSUM)
CodecUtil.ChecksumEntireFile(_input);
- indexInterval = _input.ReadInt();
+ indexInterval = _input.ReadInt32();
if (indexInterval < 1)
{
@@ -111,7 +111,7 @@ namespace Lucene.Net.Codecs.BlockTerms
SeekDir(_input, _dirOffset);
// Read directory
- int numFields = _input.ReadVInt();
+ int numFields = _input.ReadVInt32();
if (numFields < 0)
throw new CorruptIndexException(String.Format("Invalid numFields: {0}, Resource: {1}", numFields,
@@ -119,17 +119,17 @@ namespace Lucene.Net.Codecs.BlockTerms
for (int i = 0; i < numFields; i++)
{
- int field = _input.ReadVInt();
- int numIndexTerms = _input.ReadVInt();
+ int field = _input.ReadVInt32();
+ int numIndexTerms = _input.ReadVInt32();
if (numIndexTerms < 0)
throw new CorruptIndexException(String.Format("Invalid numIndexTerms: {0}, Resource: {1}",
numIndexTerms,
_input));
- long termsStart = _input.ReadVLong();
- long indexStart = _input.ReadVLong();
- long packedIndexStart = _input.ReadVLong();
- long packedOffsetsStart = _input.ReadVLong();
+ long termsStart = _input.ReadVInt64();
+ long indexStart = _input.ReadVInt64();
+ long packedIndexStart = _input.ReadVInt64();
+ long packedOffsetsStart = _input.ReadVInt64();
if (packedIndexStart < indexStart)
throw new CorruptIndexException(
@@ -186,7 +186,7 @@ namespace Lucene.Net.Codecs.BlockTerms
FixedGapTermsIndexWriter.VERSION_START, FixedGapTermsIndexWriter.VERSION_CURRENT);
if (version < FixedGapTermsIndexWriter.VERSION_APPEND_ONLY)
- _dirOffset = input.ReadLong();
+ _dirOffset = input.ReadInt64();
return version;
}
@@ -501,13 +501,13 @@ namespace Lucene.Net.Codecs.BlockTerms
if (_version >= FixedGapTermsIndexWriter.VERSION_CHECKSUM)
{
input.Seek(input.Length - CodecUtil.FooterLength() - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
else if (_version >= FixedGapTermsIndexWriter.VERSION_APPEND_ONLY)
{
input.Seek(input.Length - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
input.Seek(dirOffset);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
index 4339316..39d3209 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexWriter.cs
@@ -63,7 +63,7 @@ namespace Lucene.Net.Codecs.BlockTerms
{
_fieldInfos = state.FieldInfos;
WriteHeader(m_output);
- m_output.WriteInt(_termIndexInterval);
+ m_output.WriteInt32(_termIndexInterval);
success = true;
}
finally
@@ -246,18 +246,18 @@ namespace Lucene.Net.Codecs.BlockTerms
}
}
- m_output.WriteVInt(nonNullFieldCount);
+ m_output.WriteVInt32(nonNullFieldCount);
for (int i = 0; i < fieldCount; i++)
{
SimpleFieldWriter field = _fields[i];
if (field.numIndexTerms > 0)
{
- m_output.WriteVInt(field.fieldInfo.Number);
- m_output.WriteVInt(field.numIndexTerms);
- m_output.WriteVLong(field.termsStart);
- m_output.WriteVLong(field.indexStart);
- m_output.WriteVLong(field.packedIndexStart);
- m_output.WriteVLong(field.packedOffsetsStart);
+ m_output.WriteVInt32(field.fieldInfo.Number);
+ m_output.WriteVInt32(field.numIndexTerms);
+ m_output.WriteVInt64(field.termsStart);
+ m_output.WriteVInt64(field.indexStart);
+ m_output.WriteVInt64(field.packedIndexStart);
+ m_output.WriteVInt64(field.packedOffsetsStart);
}
}
WriteTrailer(dirStart);
@@ -281,7 +281,7 @@ namespace Lucene.Net.Codecs.BlockTerms
private void WriteTrailer(long dirStart)
{
- m_output.WriteLong(dirStart);
+ m_output.WriteInt64(dirStart);
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index bbcaac5..fb75734 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -70,7 +70,7 @@ namespace Lucene.Net.Codecs.BlockTerms
SeekDir(_input, _dirOffset);
// Read directory
- var numFields = _input.ReadVInt();
+ var numFields = _input.ReadVInt32();
if (numFields < 0)
{
throw new CorruptIndexException("invalid numFields: " + numFields + " (resource=" + _input + ")");
@@ -78,8 +78,8 @@ namespace Lucene.Net.Codecs.BlockTerms
for (var i = 0; i < numFields; i++)
{
- var field = _input.ReadVInt();
- var indexStart = _input.ReadVLong();
+ var field = _input.ReadVInt32();
+ var indexStart = _input.ReadVInt64();
var fieldInfo = fieldInfos.FieldInfo(field);
try
@@ -119,7 +119,7 @@ namespace Lucene.Net.Codecs.BlockTerms
VariableGapTermsIndexWriter.VERSION_START, VariableGapTermsIndexWriter.VERSION_CURRENT);
if (version < VariableGapTermsIndexWriter.VERSION_APPEND_ONLY)
{
- _dirOffset = input.ReadLong();
+ _dirOffset = input.ReadInt64();
}
return version;
}
@@ -218,7 +218,7 @@ namespace Lucene.Net.Codecs.BlockTerms
{
if (count == outerInstance._indexDivisor)
{
- builder.Add(Util.Fst.Util.ToIntsRef(result.Input, scratchIntsRef), result.Output);
+ builder.Add(Util.Fst.Util.ToInt32sRef(result.Input, scratchIntsRef), result.Output);
count = 0;
}
count++;
@@ -252,12 +252,12 @@ namespace Lucene.Net.Codecs.BlockTerms
if (_version >= VariableGapTermsIndexWriter.VERSION_CHECKSUM)
{
input.Seek(input.Length - CodecUtil.FooterLength() - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
else if (_version >= VariableGapTermsIndexWriter.VERSION_APPEND_ONLY)
{
input.Seek(input.Length - 8);
- dirOffset = input.ReadLong();
+ dirOffset = input.ReadInt64();
}
input.Seek(dirOffset);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
index be3f35c..1089fa8 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexWriter.cs
@@ -284,7 +284,7 @@ namespace Lucene.Net.Codecs.BlockTerms
text.Length = outerInstance.IndexedTermPrefixLength(_lastTerm, text);
try
{
- _fstBuilder.Add(Util.Fst.Util.ToIntsRef(text, _scratchIntsRef), termsFilePointer);
+ _fstBuilder.Add(Util.Fst.Util.ToInt32sRef(text, _scratchIntsRef), termsFilePointer);
}
finally
{
@@ -320,14 +320,14 @@ namespace Lucene.Net.Codecs.BlockTerms
}
}
- m_output.WriteVInt(nonNullFieldCount);
+ m_output.WriteVInt32(nonNullFieldCount);
for (int i = 0; i < fieldCount; i++)
{
FstFieldWriter field = _fields[i];
if (field.Fst != null)
{
- m_output.WriteVInt(field.FieldInfo.Number);
- m_output.WriteVLong(field.IndexStart);
+ m_output.WriteVInt32(field.FieldInfo.Number);
+ m_output.WriteVInt64(field.IndexStart);
}
}
WriteTrailer(dirStart);
@@ -342,7 +342,7 @@ namespace Lucene.Net.Codecs.BlockTerms
private void WriteTrailer(long dirStart)
{
- m_output.WriteLong(dirStart);
+ m_output.WriteInt64(dirStart);
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
index cfdcb6b..cb68c0f 100644
--- a/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Bloom/BloomFilteringPostingsFormat.cs
@@ -144,10 +144,10 @@ namespace Lucene.Net.Codecs.Bloom
_delegateFieldsProducer = delegatePostingsFormat
.FieldsProducer(state);
- var numBlooms = bloomIn.ReadInt();
+ var numBlooms = bloomIn.ReadInt32();
for (var i = 0; i < numBlooms; i++)
{
- var fieldNum = bloomIn.ReadInt();
+ var fieldNum = bloomIn.ReadInt32();
var bloom = FuzzySet.Deserialize(bloomIn);
var fieldInfo = state.FieldInfos.FieldInfo(fieldNum);
_bloomsByFieldName.Add(fieldInfo.Name, bloom);
@@ -456,12 +456,12 @@ namespace Lucene.Net.Codecs.Bloom
bloomOutput.WriteString(outerInstance._delegatePostingsFormat.Name);
// First field in the output file is the number of fields+blooms saved
- bloomOutput.WriteInt(nonSaturatedBlooms.Count);
+ bloomOutput.WriteInt32(nonSaturatedBlooms.Count);
foreach (var entry in nonSaturatedBlooms)
{
var fieldInfo = entry.Key;
var bloomFilter = entry.Value;
- bloomOutput.WriteInt(fieldInfo.Number);
+ bloomOutput.WriteInt32(fieldInfo.Number);
SaveAppropriatelySizedBloomFilter(bloomOutput, bloomFilter, fieldInfo);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
index df87f20..282c790 100644
--- a/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
+++ b/src/Lucene.Net.Codecs/Bloom/FuzzySet.cs
@@ -189,31 +189,31 @@ namespace Lucene.Net.Codecs.Bloom
/// </summary>
public virtual void Serialize(DataOutput output)
{
- output.WriteInt(VERSION_CURRENT);
- output.WriteInt(_bloomSize);
+ output.WriteInt32(VERSION_CURRENT);
+ output.WriteInt32(_bloomSize);
var bits = _filter.GetBits();
- output.WriteInt(bits.Length);
+ output.WriteInt32(bits.Length);
foreach (var t in bits)
{
// Can't used VLong encoding because cant cope with negative numbers
// output by FixedBitSet
- output.WriteLong(t);
+ output.WriteInt64(t);
}
}
public static FuzzySet Deserialize(DataInput input)
{
- var version = input.ReadInt();
+ var version = input.ReadInt32();
if (version == VERSION_SPI)
input.ReadString();
var hashFunction = HashFunctionForVersion(version);
- var bloomSize = input.ReadInt();
- var numLongs = input.ReadInt();
+ var bloomSize = input.ReadInt32();
+ var numLongs = input.ReadInt32();
var longs = new long[numLongs];
for (var i = 0; i < numLongs; i++)
{
- longs[i] = input.ReadLong();
+ longs[i] = input.ReadInt64();
}
var bits = new FixedBitSet(longs, bloomSize + 1);
return new FuzzySet(bits, bloomSize, hashFunction);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
index 6fc81d1..8412a76 100644
--- a/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/DiskDV/DiskDocValuesProducer.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net.Codecs.DiskDV
BinaryEntry bytes)
{
data.Seek(bytes.AddressesOffset);
- return new MonotonicBlockPackedReader((IndexInput)data.Clone(), bytes.PackedIntsVersion, bytes.BlockSize, bytes.Count,
+ return new MonotonicBlockPackedReader((IndexInput)data.Clone(), bytes.PackedInt32sVersion, bytes.BlockSize, bytes.Count,
true);
}
@@ -49,7 +49,7 @@ namespace Lucene.Net.Codecs.DiskDV
NumericEntry entry)
{
data.Seek(entry.Offset);
- return new MonotonicBlockPackedReader((IndexInput)data.Clone(), entry.PackedIntsVersion, entry.BlockSize, entry.Count,
+ return new MonotonicBlockPackedReader((IndexInput)data.Clone(), entry.PackedInt32sVersion, entry.BlockSize, entry.Count,
true);
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
index 991b5f0..23cbd4c 100644
--- a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.Codecs.IntBlock
public FixedIntBlockIndexInput(IndexInput @in)
{
input = @in;
- m_blockSize = @in.ReadVInt();
+ m_blockSize = @in.ReadVInt32();
}
public override AbstractReader GetReader()
@@ -146,12 +146,12 @@ namespace Lucene.Net.Codecs.IntBlock
{
if (absolute)
{
- upto = indexIn.ReadVInt();
- fp = indexIn.ReadVLong();
+ upto = indexIn.ReadVInt32();
+ fp = indexIn.ReadVInt64();
}
else
{
- int uptoDelta = indexIn.ReadVInt();
+ int uptoDelta = indexIn.ReadVInt32();
if ((uptoDelta & 1) == 1)
{
// same block
@@ -161,7 +161,7 @@ namespace Lucene.Net.Codecs.IntBlock
{
// new block
upto = (int)((uint)uptoDelta >> 1);
- fp += indexIn.ReadVLong();
+ fp += indexIn.ReadVInt64();
}
}
Debug.Assert(upto < outerInstance.m_blockSize);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
index 544b644..90672d5 100644
--- a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexOutput.cs
@@ -48,7 +48,7 @@ namespace Lucene.Net.Codecs.IntBlock
{
blockSize = fixedBlockSize;
this.m_output = output;
- output.WriteVInt(blockSize);
+ output.WriteVInt32(blockSize);
m_buffer = new int[blockSize];
}
@@ -95,21 +95,21 @@ namespace Lucene.Net.Codecs.IntBlock
{
if (absolute)
{
- indexOut.WriteVInt(upto);
- indexOut.WriteVLong(fp);
+ indexOut.WriteVInt32(upto);
+ indexOut.WriteVInt64(fp);
}
else if (fp == lastFP)
{
// same block
Debug.Assert(upto >= lastUpto);
int uptoDelta = upto - lastUpto;
- indexOut.WriteVInt(uptoDelta << 1 | 1);
+ indexOut.WriteVInt32(uptoDelta << 1 | 1);
}
else
{
// new block
- indexOut.WriteVInt(upto << 1);
- indexOut.WriteVLong(fp - lastFP);
+ indexOut.WriteVInt32(upto << 1);
+ indexOut.WriteVInt64(fp - lastFP);
}
lastUpto = upto;
lastFP = fp;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
index b4cf3b8..e388124 100644
--- a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
@@ -46,7 +46,7 @@ namespace Lucene.Net.Codecs.IntBlock
protected internal VariableIntBlockIndexInput(IndexInput input)
{
this.input = input;
- m_maxBlockSize = input.ReadInt();
+ m_maxBlockSize = input.ReadInt32();
}
public override AbstractReader GetReader()
@@ -179,12 +179,12 @@ namespace Lucene.Net.Codecs.IntBlock
{
if (absolute)
{
- upto = indexIn.ReadVInt();
- fp = indexIn.ReadVLong();
+ upto = indexIn.ReadVInt32();
+ fp = indexIn.ReadVInt64();
}
else
{
- int uptoDelta = indexIn.ReadVInt();
+ int uptoDelta = indexIn.ReadVInt32();
if ((uptoDelta & 1) == 1)
{
// same block
@@ -194,7 +194,7 @@ namespace Lucene.Net.Codecs.IntBlock
{
// new block
upto = (int)((uint)uptoDelta >> 1);
- fp += indexIn.ReadVLong();
+ fp += indexIn.ReadVInt64();
}
}
// TODO: we can't do this assert because non-causal
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
index f756777..b52ae38 100644
--- a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexOutput.cs
@@ -58,7 +58,7 @@ namespace Lucene.Net.Codecs.IntBlock
protected VariableIntBlockIndexOutput(IndexOutput output, int maxBlockSize)
{
this.m_output = output;
- this.m_output.WriteInt(maxBlockSize);
+ this.m_output.WriteInt32(maxBlockSize);
}
/// <summary>
@@ -109,21 +109,21 @@ namespace Lucene.Net.Codecs.IntBlock
Debug.Assert(upto >= 0);
if (absolute)
{
- indexOut.WriteVInt(upto);
- indexOut.WriteVLong(fp);
+ indexOut.WriteVInt32(upto);
+ indexOut.WriteVInt64(fp);
}
else if (fp == lastFP)
{
// same block
Debug.Assert(upto >= lastUpto);
int uptoDelta = upto - lastUpto;
- indexOut.WriteVInt(uptoDelta << 1 | 1);
+ indexOut.WriteVInt32(uptoDelta << 1 | 1);
}
else
{
// new block
- indexOut.WriteVInt(upto << 1);
- indexOut.WriteVLong(fp - lastFP);
+ indexOut.WriteVInt32(upto << 1);
+ indexOut.WriteVInt64(fp - lastFP);
}
lastUpto = upto;
lastFP = fp;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
index a6addd3..6181139 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesConsumer.cs
@@ -65,14 +65,14 @@ namespace Lucene.Net.Codecs.Memory
public override void AddNumericField(FieldInfo field, IEnumerable<long?> values)
{
- meta.WriteVInt(field.Number);
+ meta.WriteVInt32(field.Number);
meta.WriteByte(MemoryDocValuesProducer.NUMBER);
AddNumericFieldValues(field, values);
}
private void AddNumericFieldValues(FieldInfo field, IEnumerable<long?> values)
{
- meta.WriteLong(data.FilePointer);
+ meta.WriteInt64(data.FilePointer);
long minValue = long.MaxValue;
long maxValue = long.MinValue;
bool missing = false;
@@ -97,18 +97,18 @@ namespace Lucene.Net.Codecs.Memory
DirectDocValuesFormat.MAX_SORTED_SET_ORDS + " values/total ords");
}
}
- meta.WriteInt((int) count);
+ meta.WriteInt32((int) count);
if (missing)
{
long start = data.FilePointer;
WriteMissingBitset(values);
- meta.WriteLong(start);
- meta.WriteLong(data.FilePointer - start);
+ meta.WriteInt64(start);
+ meta.WriteInt64(data.FilePointer - start);
}
else
{
- meta.WriteLong(-1L);
+ meta.WriteInt64(-1L);
}
byte byteWidth;
@@ -148,13 +148,13 @@ namespace Lucene.Net.Codecs.Memory
data.WriteByte((byte)(sbyte) v);
break;
case 2:
- data.WriteShort((short) v);
+ data.WriteInt16((short) v);
break;
case 4:
- data.WriteInt((int) v);
+ data.WriteInt32((int) v);
break;
case 8:
- data.WriteLong(v);
+ data.WriteInt64(v);
break;
}
}
@@ -169,7 +169,7 @@ namespace Lucene.Net.Codecs.Memory
{
if (meta != null)
{
- meta.WriteVInt(-1); // write EOF marker
+ meta.WriteVInt32(-1); // write EOF marker
CodecUtil.WriteFooter(meta); // write checksum
}
if (data != null)
@@ -194,7 +194,7 @@ namespace Lucene.Net.Codecs.Memory
public override void AddBinaryField(FieldInfo field, IEnumerable<BytesRef> values)
{
- meta.WriteVInt(field.Number);
+ meta.WriteVInt32(field.Number);
meta.WriteByte(MemoryDocValuesProducer.BYTES);
AddBinaryFieldValues(field, values);
}
@@ -226,31 +226,31 @@ namespace Lucene.Net.Codecs.Memory
count++;
}
- meta.WriteLong(startFP);
- meta.WriteInt((int) totalBytes);
- meta.WriteInt(count);
+ meta.WriteInt64(startFP);
+ meta.WriteInt32((int) totalBytes);
+ meta.WriteInt32(count);
if (missing)
{
long start = data.FilePointer;
WriteMissingBitset(values);
- meta.WriteLong(start);
- meta.WriteLong(data.FilePointer - start);
+ meta.WriteInt64(start);
+ meta.WriteInt64(data.FilePointer - start);
}
else
{
- meta.WriteLong(-1L);
+ meta.WriteInt64(-1L);
}
int addr = 0;
foreach (BytesRef v in values)
{
- data.WriteInt(addr);
+ data.WriteInt32(addr);
if (v != null)
{
addr += v.Length;
}
}
- data.WriteInt(addr);
+ data.WriteInt32(addr);
}
// TODO: in some cases representing missing with minValue-1 wouldn't take up additional space and so on,
@@ -263,7 +263,7 @@ namespace Lucene.Net.Codecs.Memory
{
if (count == 64)
{
- data.WriteLong(bits);
+ data.WriteInt64(bits);
count = 0;
bits = 0;
}
@@ -275,13 +275,13 @@ namespace Lucene.Net.Codecs.Memory
}
if (count > 0)
{
- data.WriteLong(bits);
+ data.WriteInt64(bits);
}
}
public override void AddSortedField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
{
- meta.WriteVInt(field.Number);
+ meta.WriteVInt32(field.Number);
meta.WriteByte((byte)DirectDocValuesProducer.SORTED);
// write the ordinals as numerics
@@ -295,7 +295,7 @@ namespace Lucene.Net.Codecs.Memory
public override void AddSortedSetField(FieldInfo field, IEnumerable<BytesRef> values,
IEnumerable<long?> docToOrdCount, IEnumerable<long?> ords)
{
- meta.WriteVInt(field.Number);
+ meta.WriteVInt32(field.Number);
meta.WriteByte((byte)DirectDocValuesProducer.SORTED_SET);
// First write docToOrdCounts, except we "aggregate" the
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
index 1fdb2ee..fa1c9b2 100644
--- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs
@@ -118,10 +118,10 @@ namespace Lucene.Net.Codecs.Memory
private NumericEntry ReadNumericEntry(IndexInput meta)
{
- var entry = new NumericEntry { offset = meta.ReadLong(), count = meta.ReadInt(), missingOffset = meta.ReadLong() };
+ var entry = new NumericEntry { offset = meta.ReadInt64(), count = meta.ReadInt32(), missingOffset = meta.ReadInt64() };
if (entry.missingOffset != -1)
{
- entry.missingBytes = meta.ReadLong();
+ entry.missingBytes = meta.ReadInt64();
}
else
{
@@ -135,13 +135,13 @@ namespace Lucene.Net.Codecs.Memory
private BinaryEntry ReadBinaryEntry(IndexInput meta)
{
var entry = new BinaryEntry();
- entry.offset = meta.ReadLong();
- entry.numBytes = meta.ReadInt();
- entry.count = meta.ReadInt();
- entry.missingOffset = meta.ReadLong();
+ entry.offset = meta.ReadInt64();
+ entry.numBytes = meta.ReadInt32();
+ entry.count = meta.ReadInt32();
+ entry.missingOffset = meta.ReadInt64();
if (entry.missingOffset != -1)
{
- entry.missingBytes = meta.ReadLong();
+ entry.missingBytes = meta.ReadInt64();
}
else
{
@@ -170,7 +170,7 @@ namespace Lucene.Net.Codecs.Memory
private void ReadFields(IndexInput meta)
{
- int fieldNumber = meta.ReadVInt();
+ int fieldNumber = meta.ReadVInt32();
while (fieldNumber != -1)
{
int fieldType = meta.ReadByte();
@@ -194,7 +194,7 @@ namespace Lucene.Net.Codecs.Memory
{
throw new CorruptIndexException("invalid entry type: " + fieldType + ", input=" + meta);
}
- fieldNumber = meta.ReadVInt();
+ fieldNumber = meta.ReadVInt32();
}
}
@@ -245,7 +245,7 @@ namespace Lucene.Net.Codecs.Memory
var values = new short[entry.count];
for (int i = 0; i < entry.count; i++)
{
- values[i] = data.ReadShort();
+ values[i] = data.ReadInt16();
}
ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
return new NumericDocValuesAnonymousInnerClassHelper2(this, values);
@@ -256,7 +256,7 @@ namespace Lucene.Net.Codecs.Memory
var values = new int[entry.count];
for (var i = 0; i < entry.count; i++)
{
- values[i] = data.ReadInt();
+ values[i] = data.ReadInt32();
}
ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
return new NumericDocValuesAnonymousInnerClassHelper3(values);
@@ -267,7 +267,7 @@ namespace Lucene.Net.Codecs.Memory
var values = new long[entry.count];
for (int i = 0; i < entry.count; i++)
{
- values[i] = data.ReadLong();
+ values[i] = data.ReadInt64();
}
ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
return new NumericDocValuesAnonymousInnerClassHelper4(values);
@@ -363,9 +363,9 @@ namespace Lucene.Net.Codecs.Memory
var address = new int[entry.count + 1];
for (int i = 0; i < entry.count; i++)
{
- address[i] = data.ReadInt();
+ address[i] = data.ReadInt32();
}
- address[entry.count] = data.ReadInt();
+ address[entry.count] = data.ReadInt32();
ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(bytes) + RamUsageEstimator.SizeOf(address));
@@ -570,7 +570,7 @@ namespace Lucene.Net.Codecs.Memory
var bits = new long[(int)length >> 3];
for (var i = 0; i < bits.Length; i++)
{
- bits[i] = data.ReadLong();
+ bits[i] = data.ReadInt64();
}
instance = new FixedBitSet(bits, maxDoc);
docsWithFieldInstances[fieldNumber] = instance;