You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by cc...@apache.org on 2012/03/12 23:29:37 UTC
svn commit: r1299911 [1/14] - in /incubator/lucene.net/trunk: src/core/
src/core/Analysis/ src/core/Analysis/Standard/
src/core/Analysis/Tokenattributes/ src/core/Document/ src/core/Index/
src/core/Messages/ src/core/QueryParser/ src/core/Search/ src/c...
Author: ccurrens
Date: Mon Mar 12 22:29:26 2012
New Revision: 1299911
URL: http://svn.apache.org/viewvc?rev=1299911&view=rev
Log:
More work on [LUCENENET-467]. Only about 40 more warnings from FXCop on CA1024 (use properties).
Added:
incubator/lucene.net/trunk/src/core/Messages/INLSException.cs
Removed:
incubator/lucene.net/trunk/src/core/Messages/NLSException.cs
Modified:
incubator/lucene.net/trunk/src/core/Analysis/Analyzer.cs
incubator/lucene.net/trunk/src/core/Analysis/NumericTokenStream.cs
incubator/lucene.net/trunk/src/core/Analysis/PerFieldAnalyzerWrapper.cs
incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardAnalyzer.cs
incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardTokenizer.cs
incubator/lucene.net/trunk/src/core/Analysis/StopFilter.cs
incubator/lucene.net/trunk/src/core/Analysis/Token.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttributeImpl.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttributeImpl.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
incubator/lucene.net/trunk/src/core/Document/AbstractField.cs
incubator/lucene.net/trunk/src/core/Document/Document.cs
incubator/lucene.net/trunk/src/core/Document/Field.cs
incubator/lucene.net/trunk/src/core/Document/FieldSelectorResult.cs
incubator/lucene.net/trunk/src/core/Document/Fieldable.cs
incubator/lucene.net/trunk/src/core/Document/NumericField.cs
incubator/lucene.net/trunk/src/core/FileDiffs.txt
incubator/lucene.net/trunk/src/core/Index/AllTermDocs.cs
incubator/lucene.net/trunk/src/core/Index/ByteSliceReader.cs
incubator/lucene.net/trunk/src/core/Index/CheckIndex.cs
incubator/lucene.net/trunk/src/core/Index/CompoundFileReader.cs
incubator/lucene.net/trunk/src/core/Index/CompoundFileWriter.cs
incubator/lucene.net/trunk/src/core/Index/ConcurrentMergeScheduler.cs
incubator/lucene.net/trunk/src/core/Index/DefaultSkipListWriter.cs
incubator/lucene.net/trunk/src/core/Index/DirectoryReader.cs
incubator/lucene.net/trunk/src/core/Index/DocFieldConsumerPerField.cs
incubator/lucene.net/trunk/src/core/Index/DocFieldConsumersPerField.cs
incubator/lucene.net/trunk/src/core/Index/DocFieldProcessorPerField.cs
incubator/lucene.net/trunk/src/core/Index/DocFieldProcessorPerThread.cs
incubator/lucene.net/trunk/src/core/Index/DocInverterPerField.cs
incubator/lucene.net/trunk/src/core/Index/DocumentsWriter.cs
incubator/lucene.net/trunk/src/core/Index/FieldInfos.cs
incubator/lucene.net/trunk/src/core/Index/FieldInvertState.cs
incubator/lucene.net/trunk/src/core/Index/FieldSortedTermVectorMapper.cs
incubator/lucene.net/trunk/src/core/Index/FieldsReader.cs
incubator/lucene.net/trunk/src/core/Index/FieldsWriter.cs
incubator/lucene.net/trunk/src/core/Index/FilterIndexReader.cs
incubator/lucene.net/trunk/src/core/Index/FormatPostingsTermsWriter.cs
incubator/lucene.net/trunk/src/core/Index/FreqProxTermsWriterPerField.cs
incubator/lucene.net/trunk/src/core/Index/IndexCommit.cs
incubator/lucene.net/trunk/src/core/Index/IndexFileDeleter.cs
incubator/lucene.net/trunk/src/core/Index/IndexFileNameFilter.cs
incubator/lucene.net/trunk/src/core/Index/IndexReader.cs
incubator/lucene.net/trunk/src/core/Index/IndexWriter.cs
incubator/lucene.net/trunk/src/core/Index/InvertedDocConsumerPerField.cs
incubator/lucene.net/trunk/src/core/Index/LogByteSizeMergePolicy.cs
incubator/lucene.net/trunk/src/core/Index/LogDocMergePolicy.cs
incubator/lucene.net/trunk/src/core/Index/LogMergePolicy.cs
incubator/lucene.net/trunk/src/core/Index/MergePolicy.cs
incubator/lucene.net/trunk/src/core/Index/MultiLevelSkipListReader.cs
incubator/lucene.net/trunk/src/core/Index/MultiLevelSkipListWriter.cs
incubator/lucene.net/trunk/src/core/Index/MultiReader.cs
incubator/lucene.net/trunk/src/core/Index/MultipleTermPositions.cs
incubator/lucene.net/trunk/src/core/Index/NormsWriter.cs
incubator/lucene.net/trunk/src/core/Index/ParallelReader.cs
incubator/lucene.net/trunk/src/core/Index/Payload.cs
incubator/lucene.net/trunk/src/core/Index/PositionBasedTermVectorMapper.cs
incubator/lucene.net/trunk/src/core/Index/SegmentInfo.cs
incubator/lucene.net/trunk/src/core/Index/SegmentInfos.cs
incubator/lucene.net/trunk/src/core/Index/SegmentMergeInfo.cs
incubator/lucene.net/trunk/src/core/Index/SegmentMerger.cs
incubator/lucene.net/trunk/src/core/Index/SegmentReader.cs
incubator/lucene.net/trunk/src/core/Index/SegmentTermPositions.cs
incubator/lucene.net/trunk/src/core/Index/SnapshotDeletionPolicy.cs
incubator/lucene.net/trunk/src/core/Index/SortedTermVectorMapper.cs
incubator/lucene.net/trunk/src/core/Index/StoredFieldsWriter.cs
incubator/lucene.net/trunk/src/core/Index/StoredFieldsWriterPerThread.cs
incubator/lucene.net/trunk/src/core/Index/TermFreqVector.cs
incubator/lucene.net/trunk/src/core/Index/TermInfosWriter.cs
incubator/lucene.net/trunk/src/core/Index/TermPositions.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorEntry.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorEntryFreqSortedComparator.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorOffsetInfo.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorsTermsWriter.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorsTermsWriterPerField.cs
incubator/lucene.net/trunk/src/core/Index/TermVectorsWriter.cs
incubator/lucene.net/trunk/src/core/Index/TermsHashConsumerPerField.cs
incubator/lucene.net/trunk/src/core/Index/TermsHashPerField.cs
incubator/lucene.net/trunk/src/core/Lucene.Net.csproj
incubator/lucene.net/trunk/src/core/Messages/Message.cs
incubator/lucene.net/trunk/src/core/Messages/MessageImpl.cs
incubator/lucene.net/trunk/src/core/QueryParser/CharStream.cs
incubator/lucene.net/trunk/src/core/QueryParser/FastCharStream.cs
incubator/lucene.net/trunk/src/core/QueryParser/MultiFieldQueryParser.cs
incubator/lucene.net/trunk/src/core/QueryParser/QueryParser.cs
incubator/lucene.net/trunk/src/core/QueryParser/QueryParserTokenManager.cs
incubator/lucene.net/trunk/src/core/QueryParser/Token.cs
incubator/lucene.net/trunk/src/core/Search/BooleanQuery.cs
incubator/lucene.net/trunk/src/core/Search/BooleanScorer.cs
incubator/lucene.net/trunk/src/core/Search/BooleanScorer2.cs
incubator/lucene.net/trunk/src/core/Search/CachingSpanFilter.cs
incubator/lucene.net/trunk/src/core/Search/CachingWrapperFilter.cs
incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs
incubator/lucene.net/trunk/src/core/Search/DefaultSimilarity.cs
incubator/lucene.net/trunk/src/core/Search/DisjunctionMaxQuery.cs
incubator/lucene.net/trunk/src/core/Search/DocIdSet.cs
incubator/lucene.net/trunk/src/core/Search/Explanation.cs
incubator/lucene.net/trunk/src/core/Search/FieldCache.cs
incubator/lucene.net/trunk/src/core/Search/FieldCacheImpl.cs
incubator/lucene.net/trunk/src/core/Search/FieldCacheRangeFilter.cs
incubator/lucene.net/trunk/src/core/Search/FieldCacheTermsFilter.cs
incubator/lucene.net/trunk/src/core/Search/FieldComparator.cs
incubator/lucene.net/trunk/src/core/Search/FieldDocSortedHitQueue.cs
incubator/lucene.net/trunk/src/core/Search/FieldValueHitQueue.cs
incubator/lucene.net/trunk/src/core/Search/FilterManager.cs
incubator/lucene.net/trunk/src/core/Search/FilteredDocIdSet.cs
incubator/lucene.net/trunk/src/core/Search/FilteredQuery.cs
incubator/lucene.net/trunk/src/core/Search/FilteredTermEnum.cs
incubator/lucene.net/trunk/src/core/Search/Function/ByteFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/CustomScoreQuery.cs
incubator/lucene.net/trunk/src/core/Search/Function/DocValues.cs
incubator/lucene.net/trunk/src/core/Search/Function/FloatFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/IntFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/OrdFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/ReverseOrdFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/ShortFieldSource.cs
incubator/lucene.net/trunk/src/core/Search/Function/ValueSourceQuery.cs
incubator/lucene.net/trunk/src/core/Search/FuzzyQuery.cs
incubator/lucene.net/trunk/src/core/Search/FuzzyTermEnum.cs
incubator/lucene.net/trunk/src/core/Search/HitQueue.cs
incubator/lucene.net/trunk/src/core/Search/IndexSearcher.cs
incubator/lucene.net/trunk/src/core/Search/MatchAllDocsQuery.cs
incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs
incubator/lucene.net/trunk/src/core/Search/MultiSearcher.cs
incubator/lucene.net/trunk/src/core/Search/MultiTermQuery.cs
incubator/lucene.net/trunk/src/core/Search/MultiTermQueryWrapperFilter.cs
incubator/lucene.net/trunk/src/core/Search/NumericRangeFilter.cs
incubator/lucene.net/trunk/src/core/Search/NumericRangeQuery.cs
incubator/lucene.net/trunk/src/core/Search/ParallelMultiSearcher.cs
incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadNearQuery.cs
incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadSpanUtil.cs
incubator/lucene.net/trunk/src/core/Search/Payloads/PayloadTermQuery.cs
incubator/lucene.net/trunk/src/core/Search/PhraseQuery.cs
incubator/lucene.net/trunk/src/core/Search/PhraseScorer.cs
incubator/lucene.net/trunk/src/core/Search/PrefixFilter.cs
incubator/lucene.net/trunk/src/core/Search/PrefixQuery.cs
incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs
incubator/lucene.net/trunk/src/core/Search/Query.cs
incubator/lucene.net/trunk/src/core/Search/QueryWrapperFilter.cs
incubator/lucene.net/trunk/src/core/Search/ScoreCachingWrappingScorer.cs
incubator/lucene.net/trunk/src/core/Search/ScoreDoc.cs
incubator/lucene.net/trunk/src/core/Search/Scorer.cs
incubator/lucene.net/trunk/src/core/Search/Searchable.cs
incubator/lucene.net/trunk/src/core/Search/Searcher.cs
incubator/lucene.net/trunk/src/core/Search/Similarity.cs
incubator/lucene.net/trunk/src/core/Search/SingleTermEnum.cs
incubator/lucene.net/trunk/src/core/Search/SloppyPhraseScorer.cs
incubator/lucene.net/trunk/src/core/Search/SortField.cs
incubator/lucene.net/trunk/src/core/Search/SpanFilterResult.cs
incubator/lucene.net/trunk/src/core/Search/SpanQueryFilter.cs
incubator/lucene.net/trunk/src/core/Search/Spans/FieldMaskingSpanQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/NearSpansOrdered.cs
incubator/lucene.net/trunk/src/core/Search/Spans/NearSpansUnordered.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanFirstQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanNearQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanNotQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanOrQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanScorer.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanTermQuery.cs
incubator/lucene.net/trunk/src/core/Search/Spans/SpanWeight.cs
incubator/lucene.net/trunk/src/core/Search/Spans/Spans.cs
incubator/lucene.net/trunk/src/core/Search/Spans/TermSpans.cs
incubator/lucene.net/trunk/src/core/Search/TermQuery.cs
incubator/lucene.net/trunk/src/core/Search/TermRangeFilter.cs
incubator/lucene.net/trunk/src/core/Search/TermRangeQuery.cs
incubator/lucene.net/trunk/src/core/Search/TermRangeTermEnum.cs
incubator/lucene.net/trunk/src/core/Search/TermScorer.cs
incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs
incubator/lucene.net/trunk/src/core/Search/TopDocs.cs
incubator/lucene.net/trunk/src/core/Search/TopDocsCollector.cs
incubator/lucene.net/trunk/src/core/Search/TopFieldCollector.cs
incubator/lucene.net/trunk/src/core/Search/TopScoreDocCollector.cs
incubator/lucene.net/trunk/src/core/Search/Weight.cs
incubator/lucene.net/trunk/src/core/Search/WildcardQuery.cs
incubator/lucene.net/trunk/src/core/Search/WildcardTermEnum.cs
incubator/lucene.net/trunk/src/core/Store/BufferedIndexInput.cs
incubator/lucene.net/trunk/src/core/Store/BufferedIndexOutput.cs
incubator/lucene.net/trunk/src/core/Store/CheckSumIndexInput.cs
incubator/lucene.net/trunk/src/core/Store/CheckSumIndexOutput.cs
incubator/lucene.net/trunk/src/core/Store/Directory.cs
incubator/lucene.net/trunk/src/core/Store/FSDirectory.cs
incubator/lucene.net/trunk/src/core/Store/FSLockFactory.cs
incubator/lucene.net/trunk/src/core/Store/FileSwitchDirectory.cs
incubator/lucene.net/trunk/src/core/Store/IndexInput.cs
incubator/lucene.net/trunk/src/core/Store/IndexOutput.cs
incubator/lucene.net/trunk/src/core/Store/LockFactory.cs
incubator/lucene.net/trunk/src/core/Store/LockStressTest.cs
incubator/lucene.net/trunk/src/core/Store/MMapDirectory.cs
incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs
incubator/lucene.net/trunk/src/core/Store/NoLockFactory.cs
incubator/lucene.net/trunk/src/core/Store/RAMDirectory.cs
incubator/lucene.net/trunk/src/core/Store/RAMFile.cs
incubator/lucene.net/trunk/src/core/Store/RAMInputStream.cs
incubator/lucene.net/trunk/src/core/Store/RAMOutputStream.cs
incubator/lucene.net/trunk/src/core/Store/SimpleFSDirectory.cs
incubator/lucene.net/trunk/src/core/Store/SimpleFSLockFactory.cs
incubator/lucene.net/trunk/src/core/Support/Cryptography.cs
incubator/lucene.net/trunk/src/core/Util/AverageGuessMemoryModel.cs
incubator/lucene.net/trunk/src/core/Util/BitVector.cs
incubator/lucene.net/trunk/src/core/Util/DocIdBitSet.cs
incubator/lucene.net/trunk/src/core/Util/FieldCacheSanityChecker.cs
incubator/lucene.net/trunk/src/core/Util/MapOfSets.cs
incubator/lucene.net/trunk/src/core/Util/MemoryModel.cs
incubator/lucene.net/trunk/src/core/Util/OpenBitSet.cs
incubator/lucene.net/trunk/src/core/Util/OpenBitSetIterator.cs
incubator/lucene.net/trunk/src/core/Util/PriorityQueue.cs
incubator/lucene.net/trunk/src/core/Util/RamUsageEstimator.cs
incubator/lucene.net/trunk/src/core/Util/ReaderUtil.cs
incubator/lucene.net/trunk/src/core/Util/SortedVIntList.cs
incubator/lucene.net/trunk/test/core/Analysis/BaseTokenStreamTestCase.cs
incubator/lucene.net/trunk/test/core/Analysis/TestAnalyzers.cs
incubator/lucene.net/trunk/test/core/Analysis/TestStandardAnalyzer.cs
incubator/lucene.net/trunk/test/core/Analysis/TestStopAnalyzer.cs
incubator/lucene.net/trunk/test/core/Analysis/TestStopFilter.cs
incubator/lucene.net/trunk/test/core/Analysis/TestTeeSinkTokenFilter.cs
incubator/lucene.net/trunk/test/core/Analysis/TestToken.cs
incubator/lucene.net/trunk/test/core/Analysis/Tokenattributes/TestSimpleAttributeImpls.cs
incubator/lucene.net/trunk/test/core/Document/TestBinaryDocument.cs
incubator/lucene.net/trunk/test/core/Document/TestDocument.cs
incubator/lucene.net/trunk/test/core/Index/DocHelper.cs
incubator/lucene.net/trunk/test/core/Index/TestAddIndexesNoOptimize.cs
incubator/lucene.net/trunk/test/core/Index/TestAtomicUpdate.cs
incubator/lucene.net/trunk/test/core/Index/TestBackwardsCompatibility.cs
incubator/lucene.net/trunk/test/core/Index/TestCompoundFile.cs
incubator/lucene.net/trunk/test/core/Index/TestConcurrentMergeScheduler.cs
incubator/lucene.net/trunk/test/core/Index/TestCrash.cs
incubator/lucene.net/trunk/test/core/Index/TestDeletionPolicy.cs
incubator/lucene.net/trunk/test/core/Index/TestDirectoryReader.cs
incubator/lucene.net/trunk/test/core/Index/TestDoc.cs
incubator/lucene.net/trunk/test/core/Index/TestDocumentWriter.cs
incubator/lucene.net/trunk/test/core/Index/TestFieldInfos.cs
incubator/lucene.net/trunk/test/core/Index/TestFieldsReader.cs
incubator/lucene.net/trunk/test/core/Index/TestFilterIndexReader.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexCommit.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexFileDeleter.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexReader.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexReaderClone.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexReaderCloneNorms.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexReaderReopen.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriter.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriterDelete.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriterExceptions.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriterMergePolicy.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriterMerging.cs
incubator/lucene.net/trunk/test/core/Index/TestIndexWriterReader.cs
incubator/lucene.net/trunk/test/core/Index/TestIsCurrent.cs
incubator/lucene.net/trunk/test/core/Index/TestLazyBug.cs
incubator/lucene.net/trunk/test/core/Index/TestLazyProxSkipping.cs
incubator/lucene.net/trunk/test/core/Index/TestMultiLevelSkipList.cs
incubator/lucene.net/trunk/test/core/Index/TestNRTReaderWithThreads.cs
incubator/lucene.net/trunk/test/core/Index/TestNorms.cs
incubator/lucene.net/trunk/test/core/Index/TestOmitTf.cs
incubator/lucene.net/trunk/test/core/Index/TestParallelReader.cs
incubator/lucene.net/trunk/test/core/Index/TestPayloads.cs
incubator/lucene.net/trunk/test/core/Index/TestPositionBasedTermVectorMapper.cs
incubator/lucene.net/trunk/test/core/Index/TestRollback.cs
incubator/lucene.net/trunk/test/core/Index/TestSegmentMerger.cs
incubator/lucene.net/trunk/test/core/Index/TestSegmentReader.cs
incubator/lucene.net/trunk/test/core/Index/TestSegmentTermDocs.cs
incubator/lucene.net/trunk/test/core/Index/TestSnapshotDeletionPolicy.cs
incubator/lucene.net/trunk/test/core/Index/TestStressIndexing2.cs
incubator/lucene.net/trunk/test/core/Index/TestTermVectorsReader.cs
incubator/lucene.net/trunk/test/core/Index/TestThreadedOptimize.cs
incubator/lucene.net/trunk/test/core/Index/TestTransactionRollback.cs
incubator/lucene.net/trunk/test/core/Index/TestTransactions.cs
incubator/lucene.net/trunk/test/core/QueryParser/TestMultiAnalyzer.cs
incubator/lucene.net/trunk/test/core/QueryParser/TestMultiFieldQueryParser.cs
incubator/lucene.net/trunk/test/core/QueryParser/TestQueryParser.cs
incubator/lucene.net/trunk/test/core/Search/CheckHits.cs
incubator/lucene.net/trunk/test/core/Search/Function/FunctionTestSetup.cs
incubator/lucene.net/trunk/test/core/Search/Function/TestCustomScoreQuery.cs
incubator/lucene.net/trunk/test/core/Search/Function/TestFieldScoreQuery.cs
incubator/lucene.net/trunk/test/core/Search/Function/TestOrdValues.cs
incubator/lucene.net/trunk/test/core/Search/JustCompileSearch.cs
incubator/lucene.net/trunk/test/core/Search/Payloads/PayloadHelper.cs
incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadNearQuery.cs
incubator/lucene.net/trunk/test/core/Search/Payloads/TestPayloadTermQuery.cs
incubator/lucene.net/trunk/test/core/Search/QueryUtils.cs
incubator/lucene.net/trunk/test/core/Search/SingleDocTestFilter.cs
incubator/lucene.net/trunk/test/core/Search/Spans/JustCompileSearchSpans.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestBasics.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestNearSpansOrdered.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestPayloadSpans.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestSpanExplanations.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestSpans.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestSpansAdvanced.cs
incubator/lucene.net/trunk/test/core/Search/Spans/TestSpansAdvanced2.cs
incubator/lucene.net/trunk/test/core/Search/TestBoolean2.cs
incubator/lucene.net/trunk/test/core/Search/TestBooleanMinShouldMatch.cs
incubator/lucene.net/trunk/test/core/Search/TestBooleanPrefixQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestBooleanQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestBooleanScorer.cs
incubator/lucene.net/trunk/test/core/Search/TestCachingWrapperFilter.cs
incubator/lucene.net/trunk/test/core/Search/TestComplexExplanations.cs
incubator/lucene.net/trunk/test/core/Search/TestCustomSearcherSort.cs
incubator/lucene.net/trunk/test/core/Search/TestDateSort.cs
incubator/lucene.net/trunk/test/core/Search/TestDisjunctionMaxQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestDocBoost.cs
incubator/lucene.net/trunk/test/core/Search/TestElevationComparator.cs
incubator/lucene.net/trunk/test/core/Search/TestFieldCache.cs
incubator/lucene.net/trunk/test/core/Search/TestFieldCacheRangeFilter.cs
incubator/lucene.net/trunk/test/core/Search/TestFieldCacheTermsFilter.cs
incubator/lucene.net/trunk/test/core/Search/TestFilteredQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestFilteredSearch.cs
incubator/lucene.net/trunk/test/core/Search/TestFuzzyQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestMatchAllDocsQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestMultiPhraseQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestMultiSearcher.cs
incubator/lucene.net/trunk/test/core/Search/TestMultiSearcherRanking.cs
incubator/lucene.net/trunk/test/core/Search/TestMultiTermConstantScore.cs
incubator/lucene.net/trunk/test/core/Search/TestMultiThreadTermVectors.cs
incubator/lucene.net/trunk/test/core/Search/TestNumericRangeQuery32.cs
incubator/lucene.net/trunk/test/core/Search/TestNumericRangeQuery64.cs
incubator/lucene.net/trunk/test/core/Search/TestPhraseQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestPositionIncrement.cs
incubator/lucene.net/trunk/test/core/Search/TestPositiveScoresOnlyCollector.cs
incubator/lucene.net/trunk/test/core/Search/TestScorerPerf.cs
incubator/lucene.net/trunk/test/core/Search/TestSetNorm.cs
incubator/lucene.net/trunk/test/core/Search/TestSimilarity.cs
incubator/lucene.net/trunk/test/core/Search/TestSimpleExplanations.cs
incubator/lucene.net/trunk/test/core/Search/TestSloppyPhraseQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestSort.cs
incubator/lucene.net/trunk/test/core/Search/TestSpanQueryFilter.cs
incubator/lucene.net/trunk/test/core/Search/TestTermRangeFilter.cs
incubator/lucene.net/trunk/test/core/Search/TestTermRangeQuery.cs
incubator/lucene.net/trunk/test/core/Search/TestTermScorer.cs
incubator/lucene.net/trunk/test/core/Search/TestTermVectors.cs
incubator/lucene.net/trunk/test/core/Search/TestThreadSafe.cs
incubator/lucene.net/trunk/test/core/Search/TestTimeLimitingCollector.cs
incubator/lucene.net/trunk/test/core/Search/TestTopDocsCollector.cs
incubator/lucene.net/trunk/test/core/Search/TestTopScoreDocCollector.cs
incubator/lucene.net/trunk/test/core/Search/TestWildcard.cs
incubator/lucene.net/trunk/test/core/Store/MockRAMDirectory.cs
incubator/lucene.net/trunk/test/core/Store/TestBufferedIndexInput.cs
incubator/lucene.net/trunk/test/core/Store/TestFileSwitchDirectory.cs
incubator/lucene.net/trunk/test/core/Store/TestHugeRamFile.cs
incubator/lucene.net/trunk/test/core/Store/TestLockFactory.cs
incubator/lucene.net/trunk/test/core/Store/TestRAMDirectory.cs
incubator/lucene.net/trunk/test/core/Support/TestOldPatches.cs
incubator/lucene.net/trunk/test/core/TestDemo.cs
incubator/lucene.net/trunk/test/core/TestSearch.cs
incubator/lucene.net/trunk/test/core/TestSearchForDuplicates.cs
incubator/lucene.net/trunk/test/core/Util/TestAttributeSource.cs
incubator/lucene.net/trunk/test/core/Util/TestFieldCacheSanityChecker.cs
incubator/lucene.net/trunk/test/core/Util/TestSortedVIntList.cs
incubator/lucene.net/trunk/test/core/Util/_TestUtil.cs
Modified: incubator/lucene.net/trunk/src/core/Analysis/Analyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Analyzer.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Analyzer.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Analyzer.cs Mon Mar 12 22:29:26 2012
@@ -16,9 +16,9 @@
*/
using System;
+using Lucene.Net.Documents;
using Lucene.Net.Store;
using Lucene.Net.Util;
-using Fieldable = Lucene.Net.Documents.Fieldable;
namespace Lucene.Net.Analysis
{
@@ -158,9 +158,9 @@ namespace Lucene.Net.Analysis
/// </param>
/// <returns> offset gap, added to the next token emitted from <see cref="TokenStream(String,System.IO.TextReader)" />
/// </returns>
- public virtual int GetOffsetGap(Fieldable field)
+ public virtual int GetOffsetGap(IFieldable field)
{
- if (field.IsTokenized())
+ if (field.IsTokenized)
return 1;
else
return 0;
Modified: incubator/lucene.net/trunk/src/core/Analysis/NumericTokenStream.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/NumericTokenStream.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/NumericTokenStream.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/NumericTokenStream.cs Mon Mar 12 22:29:26 2012
@@ -247,7 +247,7 @@ namespace Lucene.Net.Analysis
}
typeAtt.SetType((shift == 0)?TOKEN_TYPE_FULL_PREC:TOKEN_TYPE_LOWER_PREC);
- posIncrAtt.SetPositionIncrement((shift == 0)?1:0);
+ posIncrAtt.PositionIncrement = (shift == 0)?1:0;
shift += precisionStep;
return true;
}
Modified: incubator/lucene.net/trunk/src/core/Analysis/PerFieldAnalyzerWrapper.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/PerFieldAnalyzerWrapper.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/PerFieldAnalyzerWrapper.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/PerFieldAnalyzerWrapper.cs Mon Mar 12 22:29:26 2012
@@ -129,9 +129,9 @@ namespace Lucene.Net.Analysis
}
/// <summary> Return the offsetGap from the analyzer assigned to field </summary>
- public override int GetOffsetGap(Lucene.Net.Documents.Fieldable field)
+ public override int GetOffsetGap(Lucene.Net.Documents.IFieldable field)
{
- Analyzer analyzer = analyzerMap[field.Name()] ?? defaultAnalyzer;
+ Analyzer analyzer = analyzerMap[field.Name] ?? defaultAnalyzer;
return analyzer.GetOffsetGap(field);
}
Modified: incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardAnalyzer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardAnalyzer.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardAnalyzer.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardAnalyzer.cs Mon Mar 12 22:29:26 2012
@@ -107,7 +107,7 @@ namespace Lucene.Net.Analysis.Standard
public override TokenStream TokenStream(System.String fieldName, System.IO.TextReader reader)
{
StandardTokenizer tokenStream = new StandardTokenizer(matchVersion, reader);
- tokenStream.SetMaxTokenLength(maxTokenLength);
+ tokenStream.MaxTokenLength = maxTokenLength;
TokenStream result = new StandardFilter(tokenStream);
result = new LowerCaseFilter(result);
result = new StopFilter(enableStopPositionIncrements, result, stopSet);
@@ -124,25 +124,19 @@ namespace Lucene.Net.Analysis.Standard
public const int DEFAULT_MAX_TOKEN_LENGTH = 255;
private int maxTokenLength = DEFAULT_MAX_TOKEN_LENGTH;
-
- /// <summary> Set maximum allowed token length. If a token is seen
- /// that exceeds this length then it is discarded. This
- /// setting only takes effect the next time tokenStream or
- /// reusableTokenStream is called.
- /// </summary>
- public virtual void SetMaxTokenLength(int length)
- {
- maxTokenLength = length;
- }
-
- /// <seealso cref="SetMaxTokenLength">
- /// </seealso>
- public virtual int GetMaxTokenLength()
- {
- return maxTokenLength;
- }
-
- public override TokenStream ReusableTokenStream(System.String fieldName, System.IO.TextReader reader)
+
+ /// <summary> Set maximum allowed token length. If a token is seen
+ /// that exceeds this length then it is discarded. This
+ /// setting only takes effect the next time tokenStream or
+ /// reusableTokenStream is called.
+ /// </summary>
+ public virtual int MaxTokenLength
+ {
+ get { return maxTokenLength; }
+ set { maxTokenLength = value; }
+ }
+
+ public override TokenStream ReusableTokenStream(System.String fieldName, System.IO.TextReader reader)
{
if (overridesTokenStreamMethod)
{
@@ -166,7 +160,7 @@ namespace Lucene.Net.Analysis.Standard
{
streams.tokenStream.Reset(reader);
}
- streams.tokenStream.SetMaxTokenLength(maxTokenLength);
+ streams.tokenStream.MaxTokenLength = maxTokenLength;
streams.tokenStream.SetReplaceInvalidAcronym(replaceInvalidAcronym);
Modified: incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardTokenizer.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardTokenizer.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardTokenizer.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Standard/StandardTokenizer.cs Mon Mar 12 22:29:26 2012
@@ -86,21 +86,15 @@ namespace Lucene.Net.Analysis.Standard
private bool replaceInvalidAcronym;
private int maxTokenLength;
-
- /// <summary>Set the max allowed token length. Any token longer
- /// than this is skipped.
- /// </summary>
- public void SetMaxTokenLength(int length)
- {
- this.maxTokenLength = length;
- }
-
- /// <seealso cref="SetMaxTokenLength">
- /// </seealso>
- public int GetMaxTokenLength()
- {
- return maxTokenLength;
- }
+
+ /// <summary>Set the max allowed token length. Any token longer
+ /// than this is skipped.
+ /// </summary>
+ public int MaxTokenLength
+ {
+ get { return maxTokenLength; }
+ set { this.maxTokenLength = value; }
+ }
/// <summary> Creates a new instance of the
/// <see cref="Lucene.Net.Analysis.Standard.StandardTokenizer" />. Attaches
@@ -182,7 +176,7 @@ namespace Lucene.Net.Analysis.Standard
if (scanner.Yylength() <= maxTokenLength)
{
- posIncrAtt.SetPositionIncrement(posIncr);
+ posIncrAtt.PositionIncrement = posIncr;
scanner.GetText(termAtt);
int start = scanner.Yychar();
offsetAtt.SetOffset(CorrectOffset(start), CorrectOffset(start + termAtt.TermLength()));
Modified: incubator/lucene.net/trunk/src/core/Analysis/StopFilter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/StopFilter.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/StopFilter.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/StopFilter.cs Mon Mar 12 22:29:26 2012
@@ -137,11 +137,11 @@ namespace Lucene.Net.Analysis
{
if (enablePositionIncrements)
{
- posIncrAtt.SetPositionIncrement(posIncrAtt.GetPositionIncrement() + skippedPositions);
+ posIncrAtt.PositionIncrement = posIncrAtt.PositionIncrement + skippedPositions;
}
return true;
}
- skippedPositions += posIncrAtt.GetPositionIncrement();
+ skippedPositions += posIncrAtt.PositionIncrement;
}
// reached EOS -- return false
return false;
@@ -155,32 +155,26 @@ namespace Lucene.Net.Analysis
{
return matchVersion.OnOrAfter(Version.LUCENE_29);
}
-
- /// <seealso cref="SetEnablePositionIncrements(bool)">
- /// </seealso>
- public bool GetEnablePositionIncrements()
- {
- return enablePositionIncrements;
- }
-
- /// <summary> If <c>true</c>, this StopFilter will preserve
- /// positions of the incoming tokens (ie, accumulate and
- /// set position increments of the removed stop tokens).
- /// Generally, <c>true</c> is best as it does not
- /// lose information (positions of the original tokens)
- /// during indexing.
- ///
- /// <p/> When set, when a token is stopped
- /// (omitted), the position increment of the following
- /// token is incremented.
- ///
- /// <p/> <b>NOTE</b>: be sure to also
- /// set <see cref="QueryParser.SetEnablePositionIncrements" /> if
- /// you use QueryParser to create queries.
- /// </summary>
- public void SetEnablePositionIncrements(bool enable)
- {
- this.enablePositionIncrements = enable;
- }
+
+ /// <summary> If <c>true</c>, this StopFilter will preserve
+ /// positions of the incoming tokens (ie, accumulate and
+ /// set position increments of the removed stop tokens).
+ /// Generally, <c>true</c> is best as it does not
+ /// lose information (positions of the original tokens)
+ /// during indexing.
+ ///
+ /// <p/> When set, when a token is stopped
+ /// (omitted), the position increment of the following
+ /// token is incremented.
+ ///
+ /// <p/> <b>NOTE</b>: be sure to also
+ /// set <see cref="QueryParser.EnablePositionIncrements" /> if
+ /// you use QueryParser to create queries.
+ /// </summary>
+ public bool EnablePositionIncrements
+ {
+ get { return enablePositionIncrements; }
+ set { this.enablePositionIncrements = value; }
+ }
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Analysis/Token.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Token.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Token.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Token.cs Mon Mar 12 22:29:26 2012
@@ -16,9 +16,9 @@
*/
using System;
+using Lucene.Net.Analysis.Tokenattributes;
using Lucene.Net.Support;
using Lucene.Net.Util;
-using FlagsAttribute = Lucene.Net.Analysis.Tokenattributes.FlagsAttribute;
using OffsetAttribute = Lucene.Net.Analysis.Tokenattributes.OffsetAttribute;
using PayloadAttribute = Lucene.Net.Analysis.Tokenattributes.PayloadAttribute;
using PositionIncrementAttribute = Lucene.Net.Analysis.Tokenattributes.PositionIncrementAttribute;
@@ -29,6 +29,7 @@ using TermPositions = Lucene.Net.Index.T
using ArrayUtil = Lucene.Net.Util.ArrayUtil;
using Attribute = Lucene.Net.Util.Attribute;
using AttributeImpl = Lucene.Net.Util.AttributeImpl;
+using FlagsAttribute = Lucene.Net.Analysis.Tokenattributes.FlagsAttribute;
namespace Lucene.Net.Analysis
{
@@ -242,51 +243,46 @@ namespace Lucene.Net.Analysis
startOffset = start;
endOffset = end;
}
-
- /// <summary>Set the position increment. This determines the position of this token
- /// relative to the previous Token in a <see cref="TokenStream" />, used in phrase
- /// searching.
- ///
- /// <p/>The default value is one.
- ///
- /// <p/>Some common uses for this are:<list>
- ///
- /// <item>Set it to zero to put multiple terms in the same position. This is
- /// useful if, e.g., a word has multiple stems. Searches for phrases
- /// including either stem will match. In this case, all but the first stem's
- /// increment should be set to zero: the increment of the first instance
- /// should be one. Repeating a token with an increment of zero can also be
- /// used to boost the scores of matches on that token.</item>
- ///
- /// <item>Set it to values greater than one to inhibit exact phrase matches.
- /// If, for example, one does not want phrases to match across removed stop
- /// words, then one could build a stop word filter that removes stop words and
- /// also sets the increment to the number of stop words removed before each
- /// non-stop word. Then exact phrase queries will only match when the terms
- /// occur with no intervening stop words.</item>
- ///
- /// </list>
- /// </summary>
- /// <param name="positionIncrement">the distance from the prior term
- /// </param>
- /// <seealso cref="Lucene.Net.Index.TermPositions">
- /// </seealso>
- public virtual void SetPositionIncrement(int positionIncrement)
- {
- if (positionIncrement < 0)
- throw new System.ArgumentException("Increment must be zero or greater: " + positionIncrement);
- this.positionIncrement = positionIncrement;
- }
-
- /// <summary>Returns the position increment of this Token.</summary>
- /// <seealso cref="SetPositionIncrement">
- /// </seealso>
- public virtual int GetPositionIncrement()
- {
- return positionIncrement;
- }
-
- /// <summary>Returns the Token's term text.
+
+ /// <summary>Set the position increment. This determines the position of this token
+ /// relative to the previous Token in a <see cref="TokenStream" />, used in phrase
+ /// searching.
+ ///
+ /// <p/>The default value is one.
+ ///
+ /// <p/>Some common uses for this are:<list>
+ ///
+ /// <item>Set it to zero to put multiple terms in the same position. This is
+ /// useful if, e.g., a word has multiple stems. Searches for phrases
+ /// including either stem will match. In this case, all but the first stem's
+ /// increment should be set to zero: the increment of the first instance
+ /// should be one. Repeating a token with an increment of zero can also be
+ /// used to boost the scores of matches on that token.</item>
+ ///
+ /// <item>Set it to values greater than one to inhibit exact phrase matches.
+ /// If, for example, one does not want phrases to match across removed stop
+ /// words, then one could build a stop word filter that removes stop words and
+ /// also sets the increment to the number of stop words removed before each
+ /// non-stop word. Then exact phrase queries will only match when the terms
+ /// occur with no intervening stop words.</item>
+ ///
+ /// </list>
+ /// </summary>
+ /// <value> the distance from the prior term </value>
+ /// <seealso cref="Lucene.Net.Index.TermPositions">
+ /// </seealso>
+ public virtual int PositionIncrement
+ {
+ set
+ {
+ if (value < 0)
+ throw new System.ArgumentException("Increment must be zero or greater: " + value);
+ this.positionIncrement = value;
+ }
+ get { return positionIncrement; }
+ }
+
+ /// <summary>Returns the Token's term text.
///
/// This method has a performance penalty
/// because the text is stored internally in a char[]. If
@@ -504,42 +500,30 @@ namespace Lucene.Net.Analysis
{
this.type = type;
}
-
- /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
- /// <p/>
- ///
- /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="Type()" />, although they do share similar purposes.
- /// The flags can be used to encode information about the token for use by other <see cref="TokenFilter"/>s.
- ///
- ///
- /// </summary>
- /// <returns> The bits
- /// </returns>
- public virtual int GetFlags()
- {
- return flags;
- }
-
- /// <seealso cref="GetFlags()">
- /// </seealso>
- public virtual void SetFlags(int flags)
- {
- this.flags = flags;
- }
-
- /// <summary> Returns this Token's payload.</summary>
- public virtual Payload GetPayload()
- {
- return this.payload;
- }
-
- /// <summary> Sets this Token's payload.</summary>
- public virtual void SetPayload(Payload payload)
- {
- this.payload = payload;
- }
-
- public override System.String ToString()
+
+ /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
+ /// <p/>
+ ///
+ /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="Type()" />, although they do share similar purposes.
+ /// The flags can be used to encode information about the token for use by other <see cref="TokenFilter"/>s.
+ ///
+ ///
+ /// </summary>
+ /// <value> The bits </value>
+ public virtual int Flags
+ {
+ get { return flags; }
+ set { this.flags = value; }
+ }
+
+ /// <summary> Returns this Token's payload.</summary>
+ public virtual Payload Payload
+ {
+ get { return this.payload; }
+ set { this.payload = value; }
+ }
+
+ public override System.String ToString()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append('(');
@@ -840,9 +824,9 @@ namespace Lucene.Net.Analysis
InitTermBuffer();
((TermAttribute) target).SetTermBuffer(termBuffer, 0, termLength);
((OffsetAttribute) target).SetOffset(startOffset, endOffset);
- ((PositionIncrementAttribute) target).SetPositionIncrement(positionIncrement);
- ((PayloadAttribute) target).SetPayload((payload == null)?null:(Payload) payload.Clone());
- ((FlagsAttribute) target).SetFlags(flags);
+ ((PositionIncrementAttribute) target).PositionIncrement = positionIncrement;
+ ((PayloadAttribute) target).Payload = (payload == null)?null:(Payload) payload.Clone();
+ ((FlagsAttribute) target).Flags = flags;
((TypeAttribute) target).SetType(type);
}
}
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttribute.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttribute.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttribute.cs Mon Mar 12 22:29:26 2012
@@ -28,20 +28,15 @@ namespace Lucene.Net.Analysis.Tokenattri
/// </summary>
public interface FlagsAttribute:Attribute
{
- /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
- /// <p/>
- ///
- /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="TypeAttribute.Type()" />, although they do share similar purposes.
- /// The flags can be used to encode information about the token for use by other <see cref="Lucene.Net.Analysis.TokenFilter" />s.
- ///
- ///
- /// </summary>
- /// <returns> The bits
- /// </returns>
- int GetFlags();
-
- /// <seealso cref="GetFlags()">
- /// </seealso>
- void SetFlags(int flags);
+ /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
+ /// <p/>
+ ///
+ /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="TypeAttribute.Type()" />, although they do share similar purposes.
+ /// The flags can be used to encode information about the token for use by other <see cref="Lucene.Net.Analysis.TokenFilter" />s.
+ ///
+ ///
+ /// </summary>
+ /// <value> The bits </value>
+ int Flags { get; set; }
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttributeImpl.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttributeImpl.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/FlagsAttributeImpl.cs Mon Mar 12 22:29:26 2012
@@ -29,30 +29,23 @@ namespace Lucene.Net.Analysis.Tokenattri
public class FlagsAttributeImpl:AttributeImpl, FlagsAttribute, System.ICloneable
{
private int flags = 0;
-
- /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
- /// <p/>
- ///
- /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="TypeAttribute.Type()" />, although they do share similar purposes.
- /// The flags can be used to encode information about the token for use by other <see cref="Lucene.Net.Analysis.TokenFilter" />s.
- ///
- ///
- /// </summary>
- /// <returns> The bits
- /// </returns>
- public virtual int GetFlags()
- {
- return flags;
- }
-
- /// <seealso cref="GetFlags()">
- /// </seealso>
- public virtual void SetFlags(int flags)
- {
- this.flags = flags;
- }
-
- public override void Clear()
+
+ /// <summary> EXPERIMENTAL: While we think this is here to stay, we may want to change it to be a long.
+ /// <p/>
+ ///
+ /// Get the bitset for any bits that have been set. This is completely distinct from <see cref="TypeAttribute.Type()" />, although they do share similar purposes.
+ /// The flags can be used to encode information about the token for use by other <see cref="Lucene.Net.Analysis.TokenFilter" />s.
+ ///
+ ///
+ /// </summary>
+ /// <value> The bits </value>
+ public virtual int Flags
+ {
+ get { return flags; }
+ set { this.flags = value; }
+ }
+
+ public override void Clear()
{
flags = 0;
}
@@ -80,7 +73,7 @@ namespace Lucene.Net.Analysis.Tokenattri
public override void CopyTo(AttributeImpl target)
{
FlagsAttribute t = (FlagsAttribute) target;
- t.SetFlags(flags);
+ t.Flags = flags;
}
override public System.Object Clone()
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttribute.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttribute.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttribute.cs Mon Mar 12 22:29:26 2012
@@ -26,10 +26,7 @@ namespace Lucene.Net.Analysis.Tokenattri
/// <summary> The payload of a Token. See also <see cref="Payload" />.</summary>
public interface PayloadAttribute:Attribute
{
- /// <summary> Returns this Token's payload.</summary>
- Payload GetPayload();
-
- /// <summary> Sets this Token's payload.</summary>
- void SetPayload(Payload payload);
+ /// <summary> Returns this Token's payload.</summary>
+ Payload Payload { get; set; }
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttributeImpl.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttributeImpl.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PayloadAttributeImpl.cs Mon Mar 12 22:29:26 2012
@@ -39,20 +39,15 @@ namespace Lucene.Net.Analysis.Tokenattri
{
this.payload = payload;
}
-
- /// <summary> Returns this Token's payload.</summary>
- public virtual Payload GetPayload()
- {
- return this.payload;
- }
-
- /// <summary> Sets this Token's payload.</summary>
- public virtual void SetPayload(Payload payload)
- {
- this.payload = payload;
- }
-
- public override void Clear()
+
+ /// <summary> Returns this Token's payload.</summary>
+ public virtual Payload Payload
+ {
+ get { return this.payload; }
+ set { this.payload = value; }
+ }
+
+ public override void Clear()
{
payload = null;
}
@@ -100,7 +95,7 @@ namespace Lucene.Net.Analysis.Tokenattri
public override void CopyTo(AttributeImpl target)
{
PayloadAttribute t = (PayloadAttribute) target;
- t.SetPayload((payload == null)?null:(Payload) payload.Clone());
+ t.Payload = (payload == null)?null:(Payload) payload.Clone();
}
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttribute.cs Mon Mar 12 22:29:26 2012
@@ -51,16 +51,10 @@ namespace Lucene.Net.Analysis.Tokenattri
/// </seealso>
public interface PositionIncrementAttribute:Attribute
{
- /// <summary>Set the position increment. The default value is one.
- ///
- /// </summary>
- /// <param name="positionIncrement">the distance from the prior term
- /// </param>
- void SetPositionIncrement(int positionIncrement);
-
- /// <summary>Returns the position increment of this Token.</summary>
- /// <seealso cref="SetPositionIncrement">
- /// </seealso>
- int GetPositionIncrement();
+ /// <summary>Gets or sets the position increment. The default value is one.
+ ///
+ /// </summary>
+ /// <value> the distance from the prior term </value>
+ int PositionIncrement { set; get; }
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/Tokenattributes/PositionIncrementAttributeImpl.cs Mon Mar 12 22:29:26 2012
@@ -51,28 +51,23 @@ namespace Lucene.Net.Analysis.Tokenattri
public class PositionIncrementAttributeImpl:AttributeImpl, PositionIncrementAttribute, System.ICloneable
{
private int positionIncrement = 1;
-
- /// <summary>Set the position increment. The default value is one.
- ///
- /// </summary>
- /// <param name="positionIncrement">the distance from the prior term
- /// </param>
- public virtual void SetPositionIncrement(int positionIncrement)
- {
- if (positionIncrement < 0)
- throw new System.ArgumentException("Increment must be zero or greater: " + positionIncrement);
- this.positionIncrement = positionIncrement;
- }
-
- /// <summary>Returns the position increment of this Token.</summary>
- /// <seealso cref="SetPositionIncrement">
- /// </seealso>
- public virtual int GetPositionIncrement()
- {
- return positionIncrement;
- }
-
- public override void Clear()
+
+ /// <summary>Set the position increment. The default value is one.
+ ///
+ /// </summary>
+ /// <value> the distance from the prior term </value>
+ public virtual int PositionIncrement
+ {
+ set
+ {
+ if (value < 0)
+ throw new System.ArgumentException("Increment must be zero or greater: " + value);
+ this.positionIncrement = value;
+ }
+ get { return positionIncrement; }
+ }
+
+ public override void Clear()
{
this.positionIncrement = 1;
}
@@ -100,7 +95,7 @@ namespace Lucene.Net.Analysis.Tokenattri
public override void CopyTo(AttributeImpl target)
{
PositionIncrementAttribute t = (PositionIncrementAttribute) target;
- t.SetPositionIncrement(positionIncrement);
+ t.PositionIncrement = positionIncrement;
}
override public System.Object Clone()
Modified: incubator/lucene.net/trunk/src/core/Document/AbstractField.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Document/AbstractField.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Document/AbstractField.cs (original)
+++ incubator/lucene.net/trunk/src/core/Document/AbstractField.cs Mon Mar 12 22:29:26 2012
@@ -16,7 +16,7 @@
*/
using System;
-
+using System.IO;
using TokenStream = Lucene.Net.Analysis.TokenStream;
using StringHelper = Lucene.Net.Util.StringHelper;
using PhraseQuery = Lucene.Net.Search.PhraseQuery;
@@ -29,7 +29,7 @@ namespace Lucene.Net.Documents
///
/// </summary>
[Serializable]
- public abstract class AbstractField : Fieldable
+ public abstract class AbstractField : IFieldable
{
protected internal System.String name = "body";
@@ -71,219 +71,178 @@ namespace Lucene.Net.Documents
SetStoreTermVector(termVector);
}
-
- /// <summary>Sets the boost factor hits on this field. This value will be
- /// multiplied into the score of all hits on this this field of this
- /// document.
- ///
- /// <p/>The boost is multiplied by <see cref="Lucene.Net.Documents.Document.GetBoost()" /> of the document
- /// containing this field. If a document has multiple fields with the same
- /// name, all such values are multiplied together. This product is then
- /// used to compute the norm factor for the field. By
- /// default, in the <see cref="Lucene.Net.Search.Similarity.ComputeNorm(String,Lucene.Net.Index.FieldInvertState)"/>
- /// method, the boost value is multipled
- /// by the <see cref="Lucene.Net.Search.Similarity.LengthNorm(String,int)"/> and then
- /// rounded by <see cref="Lucene.Net.Search.Similarity.EncodeNorm(float)" /> before it is stored in the
- /// index. One should attempt to ensure that this product does not overflow
- /// the range of that encoding.
- ///
- /// </summary>
- /// <seealso cref="Lucene.Net.Documents.Document.SetBoost(float)">
- /// </seealso>
- /// <seealso cref="Lucene.Net.Search.Similarity.ComputeNorm(String, Lucene.Net.Index.FieldInvertState)">
- /// </seealso>
- /// <seealso cref="Lucene.Net.Search.Similarity.EncodeNorm(float)">
- /// </seealso>
- public virtual void SetBoost(float boost)
- {
- this.boost = boost;
- }
-
- /// <summary>Returns the boost factor for hits for this field.
- ///
- /// <p/>The default value is 1.0.
- ///
- /// <p/>Note: this value is not stored directly with the document in the index.
- /// Documents returned from <see cref="Lucene.Net.Index.IndexReader.Document(int)" /> and
- /// <see cref="Lucene.Net.Search.Searcher.Doc(int)" /> may thus not have the same value present as when
- /// this field was indexed.
- ///
- /// </summary>
- /// <seealso cref="SetBoost(float)">
- /// </seealso>
- public virtual float GetBoost()
- {
- return boost;
- }
-
- /// <summary>Returns the name of the field as an interned string.
- /// For example "date", "title", "body", ...
- /// </summary>
- public virtual System.String Name()
- {
- return name;
- }
-
- protected internal virtual void SetStoreTermVector(Field.TermVector termVector)
+
+ /// <summary>Returns the boost factor for hits for this field.
+ ///
+ /// <p/>The default value is 1.0.
+ ///
+ /// <p/>Note: this value is not stored directly with the document in the index.
+ /// Documents returned from <see cref="Lucene.Net.Index.IndexReader.Document(int)" /> and
+ /// <see cref="Lucene.Net.Search.Searcher.Doc(int)" /> may thus not have the same value present as when
+ /// this field was indexed.
+ ///
+ /// </summary>
+ /// <seealso cref="SetBoost(float)">
+ /// </seealso>
+ public virtual float Boost
+ {
+ get { return boost; }
+ set { this.boost = value; }
+ }
+
+ /// <summary>Returns the name of the field as an interned string.
+ /// For example "date", "title", "body", ...
+ /// </summary>
+ public virtual string Name
+ {
+ get { return name; }
+ }
+
+ protected internal virtual void SetStoreTermVector(Field.TermVector termVector)
{
this.storeTermVector = termVector.IsStored();
this.storePositionWithTermVector = termVector.WithPositions();
this.storeOffsetWithTermVector = termVector.WithOffsets();
}
-
- /// <summary>True iff the value of the field is to be stored in the index for return
- /// with search hits. It is an error for this to be true if a field is
- /// Reader-valued.
- /// </summary>
- public bool IsStored()
- {
- return isStored;
- }
-
- /// <summary>True iff the value of the field is to be indexed, so that it may be
- /// searched on.
- /// </summary>
- public bool IsIndexed()
- {
- return isIndexed;
- }
-
- /// <summary>True iff the value of the field should be tokenized as text prior to
- /// indexing. Un-tokenized fields are indexed as a single word and may not be
- /// Reader-valued.
- /// </summary>
- public bool IsTokenized()
- {
- return isTokenized;
- }
-
- /// <summary>True iff the term or terms used to index this field are stored as a term
- /// vector, available from <see cref="Lucene.Net.Index.IndexReader.GetTermFreqVector(int,String)" />.
- /// These methods do not provide access to the original content of the field,
- /// only to terms used to index it. If the original content must be
- /// preserved, use the <c>stored</c> attribute instead.
- ///
- /// </summary>
- /// <seealso cref="Lucene.Net.Index.IndexReader.GetTermFreqVector(int, String)">
- /// </seealso>
- public bool IsTermVectorStored()
- {
- return storeTermVector;
- }
-
- /// <summary> True iff terms are stored as term vector together with their offsets
- /// (start and end position in source text).
- /// </summary>
- public virtual bool IsStoreOffsetWithTermVector()
- {
- return storeOffsetWithTermVector;
- }
-
- /// <summary> True iff terms are stored as term vector together with their token positions.</summary>
- public virtual bool IsStorePositionWithTermVector()
- {
- return storePositionWithTermVector;
- }
-
- /// <summary>True iff the value of the filed is stored as binary </summary>
- public bool IsBinary()
- {
- return isBinary;
- }
-
-
- /// <summary> Return the raw byte[] for the binary field. Note that
- /// you must also call <see cref="GetBinaryLength" /> and <see cref="GetBinaryOffset" />
- /// to know which range of bytes in this
- /// returned array belong to the field.
- /// </summary>
- /// <returns> reference to the Field value as byte[].
- /// </returns>
- public virtual byte[] GetBinaryValue()
- {
- return GetBinaryValue(null);
- }
-
- public virtual byte[] GetBinaryValue(byte[] result)
+
+ /// <summary>True iff the value of the field is to be stored in the index for return
+ /// with search hits. It is an error for this to be true if a field is
+ /// Reader-valued.
+ /// </summary>
+ public bool IsStored
+ {
+ get { return isStored; }
+ }
+
+ /// <summary>True iff the value of the field is to be indexed, so that it may be
+ /// searched on.
+ /// </summary>
+ public bool IsIndexed
+ {
+ get { return isIndexed; }
+ }
+
+ /// <summary>True iff the value of the field should be tokenized as text prior to
+ /// indexing. Un-tokenized fields are indexed as a single word and may not be
+ /// Reader-valued.
+ /// </summary>
+ public bool IsTokenized
+ {
+ get { return isTokenized; }
+ }
+
+ /// <summary>True iff the term or terms used to index this field are stored as a term
+ /// vector, available from <see cref="Lucene.Net.Index.IndexReader.GetTermFreqVector(int,String)" />.
+ /// These methods do not provide access to the original content of the field,
+ /// only to terms used to index it. If the original content must be
+ /// preserved, use the <c>stored</c> attribute instead.
+ ///
+ /// </summary>
+ /// <seealso cref="Lucene.Net.Index.IndexReader.GetTermFreqVector(int, String)">
+ /// </seealso>
+ public bool IsTermVectorStored
+ {
+ get { return storeTermVector; }
+ }
+
+ /// <summary> True iff terms are stored as term vector together with their offsets
+ /// (start and end position in source text).
+ /// </summary>
+ public virtual bool IsStoreOffsetWithTermVector
+ {
+ get { return storeOffsetWithTermVector; }
+ }
+
+ /// <summary> True iff terms are stored as term vector together with their token positions.</summary>
+ public virtual bool IsStorePositionWithTermVector
+ {
+ get { return storePositionWithTermVector; }
+ }
+
+ /// <summary>True iff the value of the filed is stored as binary </summary>
+ public bool IsBinary
+ {
+ get { return isBinary; }
+ }
+
+
+ /// <summary> Return the raw byte[] for the binary field. Note that
+ /// you must also call <see cref="GetBinaryLength" /> and <see cref="GetBinaryOffset" />
+ /// to know which range of bytes in this
+ /// returned array belong to the field.
+ /// </summary>
+ /// <value> reference to the Field value as byte[]. </value>
+ public virtual byte[] BinaryValue
+ {
+ get { return GetBinaryValue(null); }
+ }
+
+ public virtual byte[] GetBinaryValue(byte[] result)
{
if (isBinary || fieldsData is byte[])
return (byte[]) fieldsData;
else
return null;
}
-
- /// <summary> Returns length of byte[] segment that is used as value, if Field is not binary
- /// returned value is undefined
- /// </summary>
- /// <returns> length of byte[] segment that represents this Field value
- /// </returns>
- public virtual int GetBinaryLength()
- {
- if (isBinary)
- {
- return binaryLength;
- }
- else if (fieldsData is byte[])
- return ((byte[]) fieldsData).Length;
- else
- return 0;
- }
-
- /// <summary> Returns offset into byte[] segment that is used as value, if Field is not binary
- /// returned value is undefined
- /// </summary>
- /// <returns> index of the first character in byte[] segment that represents this Field value
- /// </returns>
- public virtual int GetBinaryOffset()
- {
- return binaryOffset;
- }
-
- /// <summary>True if norms are omitted for this indexed field </summary>
- public virtual bool GetOmitNorms()
- {
- return omitNorms;
- }
-
- /// <seealso cref="SetOmitTermFreqAndPositions">
- /// </seealso>
- public virtual bool GetOmitTermFreqAndPositions()
- {
- return omitTermFreqAndPositions;
- }
-
- /// <summary>Expert:
- ///
- /// If set, omit normalization factors associated with this indexed field.
- /// This effectively disables indexing boosts and length normalization for this field.
- /// </summary>
- public virtual void SetOmitNorms(bool omitNorms)
- {
- this.omitNorms = omitNorms;
- }
-
- /// <summary>Expert:
- ///
- /// If set, omit term freq, positions and payloads from
- /// postings for this field.
- ///
- /// <p/><b>NOTE</b>: While this option reduces storage space
- /// required in the index, it also means any query
- /// requiring positional information, such as <see cref="PhraseQuery" />
- /// or <see cref="SpanQuery" /> subclasses will
- /// silently fail to find results.
- /// </summary>
- public virtual void SetOmitTermFreqAndPositions(bool omitTermFreqAndPositions)
- {
- this.omitTermFreqAndPositions = omitTermFreqAndPositions;
- }
-
- public virtual bool IsLazy()
- {
- return lazy;
- }
-
- /// <summary>Prints a Field for human consumption. </summary>
+
+ /// <summary> Returns length of byte[] segment that is used as value, if Field is not binary
+ /// returned value is undefined
+ /// </summary>
+ /// <value> length of byte[] segment that represents this Field value </value>
+ public virtual int BinaryLength
+ {
+ get
+ {
+ if (isBinary)
+ {
+ return binaryLength;
+ }
+ else if (fieldsData is byte[])
+ return ((byte[]) fieldsData).Length;
+ else
+ return 0;
+ }
+ }
+
+ /// <summary> Returns offset into byte[] segment that is used as value, if Field is not binary
+ /// returned value is undefined
+ /// </summary>
+ /// <value> index of the first character in byte[] segment that represents this Field value </value>
+ public virtual int BinaryOffset
+ {
+ get { return binaryOffset; }
+ }
+
+ /// <summary>True if norms are omitted for this indexed field </summary>
+ public virtual bool OmitNorms
+ {
+ get { return omitNorms; }
+ set { this.omitNorms = value; }
+ }
+
+ /// <summary>Expert:
+ ///
+ /// If set, omit term freq, positions and payloads from
+ /// postings for this field.
+ ///
+ /// <p/><b>NOTE</b>: While this option reduces storage space
+ /// required in the index, it also means any query
+ /// requiring positional information, such as <see cref="PhraseQuery" />
+ /// or <see cref="SpanQuery" /> subclasses will
+ /// silently fail to find results.
+ /// </summary>
+ public virtual bool OmitTermFreqAndPositions
+ {
+ set { this.omitTermFreqAndPositions = value; }
+ get { return omitTermFreqAndPositions; }
+ }
+
+ public virtual bool IsLazy
+ {
+ get { return lazy; }
+ }
+
+ /// <summary>Prints a Field for human consumption. </summary>
public override System.String ToString()
{
System.Text.StringBuilder result = new System.Text.StringBuilder();
@@ -351,8 +310,9 @@ namespace Lucene.Net.Documents
result.Append('>');
return result.ToString();
}
- public abstract Lucene.Net.Analysis.TokenStream TokenStreamValue();
- public abstract System.IO.TextReader ReaderValue();
- public abstract System.String StringValue();
+
+ public abstract TokenStream TokenStreamValue { get; }
+ public abstract TextReader ReaderValue { get; }
+ public abstract string StringValue { get; }
}
}
\ No newline at end of file
Modified: incubator/lucene.net/trunk/src/core/Document/Document.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Document/Document.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Document/Document.cs (original)
+++ incubator/lucene.net/trunk/src/core/Document/Document.cs Mon Mar 12 22:29:26 2012
@@ -28,13 +28,13 @@ namespace Lucene.Net.Documents
/// <summary>Documents are the unit of indexing and search.
///
/// A Document is a set of fields. Each field has a name and a textual value.
- /// A field may be <see cref="Fieldable.IsStored()">stored</see> with the document, in which
+ /// A field may be <see cref="IFieldable.IsStored()">stored</see> with the document, in which
/// case it is returned with search hits on the document. Thus each document
/// should typically contain one or more stored fields which uniquely identify
/// it.
///
- /// <p/>Note that fields which are <i>not</i> <see cref="Fieldable.IsStored()">stored</see> are
- /// <i>not</i> available in documents retrieved from the index, e.g. with <see cref="ScoreDoc.doc" />,
+ /// <p/>Note that fields which are <i>not</i> <see cref="IFieldable.IsStored()">stored</see> are
+ /// <i>not</i> available in documents retrieved from the index, e.g. with <see cref="ScoreDoc.Doc" />,
/// <see cref="Searcher.Doc(int)" /> or <see cref="IndexReader.Document(int)" />.
/// </summary>
@@ -93,7 +93,7 @@ namespace Lucene.Net.Documents
return iter.Current;
}
}
- internal System.Collections.Generic.IList<Fieldable> fields = new System.Collections.Generic.List<Fieldable>();
+ internal System.Collections.Generic.IList<IFieldable> fields = new System.Collections.Generic.List<IFieldable>();
private float boost = 1.0f;
/// <summary>Constructs a new document with no fields. </summary>
@@ -107,37 +107,37 @@ namespace Lucene.Net.Documents
///
/// <p/>The default value is 1.0.
///
- /// <p/>Values are multiplied into the value of <see cref="Fieldable.GetBoost()" /> of
+ /// <p/>Values are multiplied into the value of <see cref="IFieldable.GetBoost()" /> of
/// each field in this document. Thus, this method in effect sets a default
/// boost for the fields of this document.
///
/// </summary>
- /// <seealso cref="Fieldable.SetBoost(float)">
+ /// <seealso cref="IFieldable.SetBoost(float)">
/// </seealso>
public void SetBoost(float boost)
{
this.boost = boost;
}
-
- /// <summary>Returns, at indexing time, the boost factor as set by <see cref="SetBoost(float)" />.
- ///
- /// <p/>Note that once a document is indexed this value is no longer available
- /// from the index. At search time, for retrieved documents, this method always
- /// returns 1. This however does not mean that the boost value set at indexing
- /// time was ignored - it was just combined with other indexing time factors and
- /// stored elsewhere, for better indexing and search performance. (For more
- /// information see the "norm(t,d)" part of the scoring formula in
- /// <see cref="Lucene.Net.Search.Similarity">Similarity</see>.)
- ///
- /// </summary>
- /// <seealso cref="SetBoost(float)">
- /// </seealso>
- public float GetBoost()
- {
- return boost;
- }
-
- /// <summary> <p/>Adds a field to a document. Several fields may be added with
+
+ /// <summary>Returns, at indexing time, the boost factor as set by <see cref="SetBoost(float)" />.
+ ///
+ /// <p/>Note that once a document is indexed this value is no longer available
+ /// from the index. At search time, for retrieved documents, this method always
+ /// returns 1. This however does not mean that the boost value set at indexing
+ /// time was ignored - it was just combined with other indexing time factors and
+ /// stored elsewhere, for better indexing and search performance. (For more
+ /// information see the "norm(t,d)" part of the scoring formula in
+ /// <see cref="Lucene.Net.Search.Similarity">Similarity</see>.)
+ ///
+ /// </summary>
+ /// <seealso cref="SetBoost(float)">
+ /// </seealso>
+ public float Boost
+ {
+ get { return boost; }
+ }
+
+ /// <summary> <p/>Adds a field to a document. Several fields may be added with
/// the same name. In this case, if the fields are indexed, their text is
/// treated as though appended for the purposes of search.<p/>
/// <p/> Note that add like the removeField(s) methods only makes sense
@@ -146,7 +146,7 @@ namespace Lucene.Net.Documents
/// a document has to be deleted from an index and a new changed version of that
/// document has to be added.<p/>
/// </summary>
- public void Add(Fieldable field)
+ public void Add(IFieldable field)
{
fields.Add(field);
}
@@ -162,11 +162,11 @@ namespace Lucene.Net.Documents
/// </summary>
public void RemoveField(System.String name)
{
- System.Collections.Generic.IEnumerator<Fieldable> it = fields.GetEnumerator();
+ System.Collections.Generic.IEnumerator<IFieldable> it = fields.GetEnumerator();
while (it.MoveNext())
{
- Fieldable field = it.Current;
- if (field.Name().Equals(name))
+ IFieldable field = it.Current;
+ if (field.Name.Equals(name))
{
fields.Remove(field);
return ;
@@ -186,8 +186,8 @@ namespace Lucene.Net.Documents
{
for (int i = fields.Count - 1; i >= 0; i--)
{
- Fieldable field = fields[i];
- if (field.Name().Equals(name))
+ IFieldable field = fields[i];
+ if (field.Name.Equals(name))
{
fields.RemoveAt(i);
}
@@ -209,11 +209,11 @@ namespace Lucene.Net.Documents
/// null. If multiple fields exists with this name, this method returns the
/// first value added.
/// </summary>
- public Fieldable GetFieldable(System.String name)
+ public IFieldable GetFieldable(System.String name)
{
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name))
+ if (field.Name.Equals(name))
return field;
}
return null;
@@ -226,20 +226,20 @@ namespace Lucene.Net.Documents
/// </summary>
public System.String Get(System.String name)
{
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name) && (!field.IsBinary()))
- return field.StringValue();
+ if (field.Name.Equals(name) && (!field.IsBinary))
+ return field.StringValue;
}
return null;
}
/// <summary>Returns a List of all the fields in a document.
- /// <p/>Note that fields which are <i>not</i> <see cref="Fieldable.IsStored()">stored</see> are
+ /// <p/>Note that fields which are <i>not</i> <see cref="IFieldable.IsStored()">stored</see> are
/// <i>not</i> available in documents retrieved from the
/// index, e.g. <see cref="Searcher.Doc(int)" /> or <see cref="IndexReader.Document(int)" />.
/// </summary>
- public System.Collections.Generic.IList<Fieldable> GetFields()
+ public System.Collections.Generic.IList<IFieldable> GetFields()
{
return fields;
}
@@ -259,9 +259,9 @@ namespace Lucene.Net.Documents
public Field[] GetFields(System.String name)
{
var result = new System.Collections.Generic.List<Field>();
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name))
+ if (field.Name.Equals(name))
{
result.Add((Field)field);
}
@@ -274,9 +274,9 @@ namespace Lucene.Net.Documents
}
- private static readonly Fieldable[] NO_FIELDABLES = new Fieldable[0];
+ private static readonly IFieldable[] NO_FIELDABLES = new IFieldable[0];
- /// <summary> Returns an array of <see cref="Fieldable" />s with the given name.
+ /// <summary> Returns an array of <see cref="IFieldable" />s with the given name.
/// This method returns an empty array when there are no
/// matching fields. It never returns null.
///
@@ -285,12 +285,12 @@ namespace Lucene.Net.Documents
/// </param>
/// <returns> a <c>Fieldable[]</c> array
/// </returns>
- public Fieldable[] GetFieldables(System.String name)
+ public IFieldable[] GetFieldables(System.String name)
{
- var result = new System.Collections.Generic.List<Fieldable>();
- foreach(Fieldable field in fields)
+ var result = new System.Collections.Generic.List<IFieldable>();
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name))
+ if (field.Name.Equals(name))
{
result.Add(field);
}
@@ -316,10 +316,10 @@ namespace Lucene.Net.Documents
public System.String[] GetValues(System.String name)
{
var result = new System.Collections.Generic.List<string>();
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name) && (!field.IsBinary()))
- result.Add(field.StringValue());
+ if (field.Name.Equals(name) && (!field.IsBinary))
+ result.Add(field.StringValue);
}
if (result.Count == 0)
@@ -343,10 +343,10 @@ namespace Lucene.Net.Documents
public byte[][] GetBinaryValues(System.String name)
{
var result = new System.Collections.Generic.List<byte[]>();
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name) && (field.IsBinary()))
- result.Add(field.GetBinaryValue());
+ if (field.Name.Equals(name) && (field.IsBinary))
+ result.Add(field.BinaryValue);
}
if (result.Count == 0)
@@ -367,10 +367,10 @@ namespace Lucene.Net.Documents
/// </returns>
public byte[] GetBinaryValue(System.String name)
{
- foreach(Fieldable field in fields)
+ foreach(IFieldable field in fields)
{
- if (field.Name().Equals(name) && (field.IsBinary()))
- return field.GetBinaryValue();
+ if (field.Name.Equals(name) && (field.IsBinary))
+ return field.BinaryValue;
}
return null;
}
@@ -382,7 +382,7 @@ namespace Lucene.Net.Documents
buffer.Append("Document<");
for (int i = 0; i < fields.Count; i++)
{
- Fieldable field = fields[i];
+ IFieldable field = fields[i];
buffer.Append(field.ToString());
if (i != fields.Count - 1)
buffer.Append(" ");
@@ -391,7 +391,7 @@ namespace Lucene.Net.Documents
return buffer.ToString();
}
- public System.Collections.Generic.IList<Fieldable> fields_ForNUnit
+ public System.Collections.Generic.IList<IFieldable> fields_ForNUnit
{
get { return fields; }
}
Modified: incubator/lucene.net/trunk/src/core/Document/Field.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Document/Field.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Document/Field.cs (original)
+++ incubator/lucene.net/trunk/src/core/Document/Field.cs Mon Mar 12 22:29:26 2012
@@ -16,7 +16,7 @@
*/
using System;
-
+using System.IO;
using TokenStream = Lucene.Net.Analysis.TokenStream;
using IndexWriter = Lucene.Net.Index.IndexWriter;
using StringHelper = Lucene.Net.Util.StringHelper;
@@ -32,7 +32,7 @@ namespace Lucene.Net.Documents
/// </summary>
[Serializable]
- public sealed class Field:AbstractField, Fieldable
+ public sealed class Field:AbstractField, IFieldable
{
/// <summary>Specifies whether and how a field should be stored. </summary>
public enum Store
@@ -132,35 +132,35 @@ namespace Lucene.Net.Documents
/// </seealso>
WITH_POSITIONS_OFFSETS,
}
-
-
+
+
/// <summary>The value of the field as a String, or null. If null, the Reader value or
/// binary value is used. Exactly one of stringValue(),
/// readerValue(), and getBinaryValue() must be set.
/// </summary>
- public override System.String StringValue()
+ public override string StringValue
{
- return fieldsData is System.String?(System.String) fieldsData:null;
+ get { return fieldsData is System.String ? (System.String) fieldsData : null; }
}
-
+
/// <summary>The value of the field as a Reader, or null. If null, the String value or
/// binary value is used. Exactly one of stringValue(),
/// readerValue(), and getBinaryValue() must be set.
/// </summary>
- public override System.IO.TextReader ReaderValue()
+ public override TextReader ReaderValue
{
- return fieldsData is System.IO.TextReader?(System.IO.TextReader) fieldsData:null;
+ get { return fieldsData is System.IO.TextReader ? (System.IO.TextReader) fieldsData : null; }
}
/// <summary>The TokesStream for this field to be used when indexing, or null. If null, the Reader value
/// or String value is analyzed to produce the indexed tokens.
/// </summary>
- public override TokenStream TokenStreamValue()
+ public override TokenStream TokenStreamValue
{
- return tokenStream;
+ get { return tokenStream; }
}
-
-
+
+
/// <summary><p/>Expert: change the value of this field. This can
/// be used during indexing to re-use a single Field
/// instance to improve indexing speed by avoiding GC cost
Modified: incubator/lucene.net/trunk/src/core/Document/FieldSelectorResult.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Document/FieldSelectorResult.cs?rev=1299911&r1=1299910&r2=1299911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Document/FieldSelectorResult.cs (original)
+++ incubator/lucene.net/trunk/src/core/Document/FieldSelectorResult.cs Mon Mar 12 22:29:26 2012
@@ -32,22 +32,22 @@ namespace Lucene.Net.Documents
/// <summary> Load this <see cref="Field" /> every time the <see cref="Document" /> is loaded, reading in the data as it is encountered.
/// <see cref="Document.GetField(String)" /> and <see cref="Document.GetFieldable(String)" /> should not return null.
/// <p/>
- /// <see cref="Document.Add(Fieldable)" /> should be called by the Reader.
+ /// <see cref="Document.Add(IFieldable)" /> should be called by the Reader.
/// </summary>
LOAD,
/// <summary> Lazily load this <see cref="Field" />. This means the <see cref="Field" /> is valid, but it may not actually contain its data until
/// invoked. <see cref="Document.GetField(String)" /> SHOULD NOT BE USED. <see cref="Document.GetFieldable(String)" /> is safe to use and should
- /// return a valid instance of a <see cref="Fieldable" />.
+ /// return a valid instance of a <see cref="IFieldable" />.
/// <p/>
- /// <see cref="Document.Add(Fieldable)" /> should be called by the Reader.
+ /// <see cref="Document.Add(IFieldable)" /> should be called by the Reader.
/// </summary>
LAZY_LOAD,
/// <summary> Do not load the <see cref="Field" />. <see cref="Document.GetField(String)" /> and <see cref="Document.GetFieldable(String)" /> should return null.
- /// <see cref="Document.Add(Fieldable)" /> is not called.
+ /// <see cref="Document.Add(IFieldable)" /> is not called.
/// <p/>
- /// <see cref="Document.Add(Fieldable)" /> should not be called by the Reader.
+ /// <see cref="Document.Add(IFieldable)" /> should not be called by the Reader.
/// </summary>
NO_LOAD,
@@ -55,7 +55,7 @@ namespace Lucene.Net.Documents
/// Document may not have its complete set of Fields. <see cref="Document.GetField(String)" /> and <see cref="Document.GetFieldable(String)" /> should
/// both be valid for this <see cref="Field" />
/// <p/>
- /// <see cref="Document.Add(Fieldable)" /> should be called by the Reader.
+ /// <see cref="Document.Add(IFieldable)" /> should be called by the Reader.
/// </summary>
LOAD_AND_BREAK,